1 Star 0 Fork 55

Jingwiw/firefox

forked from src-openEuler/firefox 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vendor-rust-riscv64-hack.patch 8.37 KB
一键复制 编辑 原始数据 按行查看 历史
Jingwiw 提交于 2022-12-06 22:55 +08:00 . riscv
Temporary hack to allow us to directly apply diff of matoko's branch. Disable
rust-vet to skip auditing third party libs in order to download/vendor rust
deps on non-git firefox src. Skip some style checks, as
macroassembler support in js/src/jit/ is not complete yet
diff --git a/python/mozbuild/mozbuild/vendor/vendor_rust.py b/python/mozbuild/mozbuild/vendor/vendor_rust.py
index bc9a9727ae..8cfdba4add 100644
--- a/python/mozbuild/mozbuild/vendor/vendor_rust.py
+++ b/python/mozbuild/mozbuild/vendor/vendor_rust.py
@@ -747,96 +747,96 @@ license file's hash.
failed = True
# Only emit warnings for cargo-vet for now.
- env = os.environ.copy()
- env["PATH"] = os.pathsep.join(
- (
- str(Path(cargo).parent),
- os.environ["PATH"],
- )
- )
- flags = ["--output-format=json"]
- if "MOZ_AUTOMATION" in os.environ:
- flags.append("--locked")
- flags.append("--frozen")
- res = cargo_vet(
- self,
- flags,
- stdout=subprocess.PIPE,
- env=env,
- )
- if res.returncode:
- vet = json.loads(res.stdout)
- logged_error = False
- for failure in vet.get("failures", []):
- failure["crate"] = failure.pop("name")
- self.log(
- logging.ERROR,
- "cargo_vet_failed",
- failure,
- "Missing audit for {crate}:{version} (requires {missing_criteria})."
- " Run `./mach cargo vet` for more information.",
- )
- logged_error = True
- # NOTE: This could log more information, but the violation JSON
- # output isn't super stable yet, so it's probably simpler to tell
- # the caller to run `./mach cargo vet` directly.
- for key in vet.get("violations", {}).keys():
- self.log(
- logging.ERROR,
- "cargo_vet_failed",
- {"key": key},
- "Violation conflict for {key}. Run `./mach cargo vet` for more information.",
- )
- logged_error = True
- if "error" in vet:
- # NOTE: The error format produced by cargo-vet is from the
- # `miette` crate, and can include a lot of metadata and context.
- # If we want to show more details in the future, we can expand
- # this rendering to also include things like source labels and
- # related error metadata.
- error = vet["error"]
- self.log(
- logging.ERROR,
- "cargo_vet_failed",
- error,
- "Vet {severity}: {message}",
- )
- if "help" in error:
- self.log(logging.INFO, "cargo_vet_failed", error, " help: {help}")
- for cause in error.get("causes", []):
- self.log(
- logging.INFO,
- "cargo_vet_failed",
- {"cause": cause},
- " cause: {cause}",
- )
- for related in error.get("related", []):
- self.log(
- logging.INFO,
- "cargo_vet_failed",
- related,
- " related {severity}: {message}",
- )
- self.log(
- logging.INFO,
- "cargo_vet_failed",
- {},
- "Run `./mach cargo vet` for more information.",
- )
- logged_error = True
- if not logged_error:
- self.log(
- logging.ERROR,
- "cargo_vet_failed",
- {},
- "Unknown vet error. Run `./mach cargo vet` for more information.",
- )
- failed = True
-
- # If we failed when checking the crates list and/or running `cargo vet`,
- # stop before invoking `cargo vendor`.
- if failed:
- return False
+ # env = os.environ.copy()
+ # env["PATH"] = os.pathsep.join(
+ # (
+ # str(Path(cargo).parent),
+ # os.environ["PATH"],
+ # )
+ # )
+ # flags = ["--output-format=json"]
+ # if "MOZ_AUTOMATION" in os.environ:
+ # flags.append("--locked")
+ # flags.append("--frozen")
+ # res = cargo_vet(
+ # self,
+ # flags,
+ # stdout=subprocess.PIPE,
+ # env=env,
+ # )
+ # if res.returncode:
+ # vet = json.loads(res.stdout)
+ # logged_error = False
+ # for failure in vet.get("failures", []):
+ # failure["crate"] = failure.pop("name")
+ # self.log(
+ # logging.ERROR,
+ # "cargo_vet_failed",
+ # failure,
+ # "Missing audit for {crate}:{version} (requires {missing_criteria})."
+ # " Run `./mach cargo vet` for more information.",
+ # )
+ # logged_error = True
+ # # NOTE: This could log more information, but the violation JSON
+ # # output isn't super stable yet, so it's probably simpler to tell
+ # # the caller to run `./mach cargo vet` directly.
+ # for key in vet.get("violations", {}).keys():
+ # self.log(
+ # logging.ERROR,
+ # "cargo_vet_failed",
+ # {"key": key},
+ # "Violation conflict for {key}. Run `./mach cargo vet` for more information.",
+ # )
+ # logged_error = True
+ # if "error" in vet:
+ # # NOTE: The error format produced by cargo-vet is from the
+ # # `miette` crate, and can include a lot of metadata and context.
+ # # If we want to show more details in the future, we can expand
+ # # this rendering to also include things like source labels and
+ # # related error metadata.
+ # error = vet["error"]
+ # self.log(
+ # logging.ERROR,
+ # "cargo_vet_failed",
+ # error,
+ # "Vet {severity}: {message}",
+ # )
+ # if "help" in error:
+ # self.log(logging.INFO, "cargo_vet_failed", error, " help: {help}")
+ # for cause in error.get("causes", []):
+ # self.log(
+ # logging.INFO,
+ # "cargo_vet_failed",
+ # {"cause": cause},
+ # " cause: {cause}",
+ # )
+ # for related in error.get("related", []):
+ # self.log(
+ # logging.INFO,
+ # "cargo_vet_failed",
+ # related,
+ # " related {severity}: {message}",
+ # )
+ # self.log(
+ # logging.INFO,
+ # "cargo_vet_failed",
+ # {},
+ # "Run `./mach cargo vet` for more information.",
+ # )
+ # logged_error = True
+ # if not logged_error:
+ # self.log(
+ # logging.ERROR,
+ # "cargo_vet_failed",
+ # {},
+ # "Unknown vet error. Run `./mach cargo vet` for more information.",
+ # )
+ # failed = True
+
+ # # If we failed when checking the crates list and/or running `cargo vet`,
+ # # stop before invoking `cargo vendor`.
+ # if failed:
+ # return False
res = subprocess.run(
[cargo, "vendor", vendor_dir], cwd=self.topsrcdir, stdout=subprocess.PIPE
@@ -913,7 +913,8 @@ license file's hash.
directory=replace["directory"],
)
)
-
+ return True
+
if not self._check_licenses(vendor_dir):
self.log(
logging.ERROR,
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Jingwiw/firefox.git
git@gitee.com:Jingwiw/firefox.git
Jingwiw
firefox
firefox
master

搜索帮助