Skip to content

Commit

Permalink
lang/rust-nightly: Update to 1.57.0.20211006
Browse files Browse the repository at this point in the history
- Add missing cargo patch

Changes:	rust-lang/rust@003d8d3...25ec827
  • Loading branch information
Tobias Kortkamp authored and Tobias Kortkamp committed Oct 7, 2021
1 parent 77116c1 commit d6b6cae
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lang/rust-nightly/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ MASTERDIR= ${.CURDIR}/../rust
PATCHDIR= ${.CURDIR}/files
DISTINFO_FILE= ${.CURDIR}/distinfo

NIGHTLY_DATE= 2021-10-05
NIGHTLY_DATE= 2021-10-06
BOOTSTRAPS_DATE= 2021-09-08
RUST_BOOTSTRAP_VERSION= beta

Expand Down
6 changes: 3 additions & 3 deletions lang/rust-nightly/distinfo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TIMESTAMP = 1633514113
SHA256 (rust/2021-10-05/rustc-nightly-src.tar.xz) = de6745a76edeaf447a9cfa9cc296b7a69550225323199741b44948a680c36197
SIZE (rust/2021-10-05/rustc-nightly-src.tar.xz) = 122279192
TIMESTAMP = 1633606205
SHA256 (rust/2021-10-06/rustc-nightly-src.tar.xz) = 28c9e6ff47e07e4e68f8964488ad254369fa897f0e6943504a6b5e6cfc8609a8
SIZE (rust/2021-10-06/rustc-nightly-src.tar.xz) = 122318988
SHA256 (rust/2021-09-08/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 4e01128800f479a96597ce7eee9d2e76a5128ae1c13a4e0e2eb52e36d43cf559
SIZE (rust/2021-09-08/rustc-beta-x86_64-unknown-freebsd.tar.xz) = 120261460
SHA256 (rust/2021-09-08/rust-std-beta-x86_64-unknown-freebsd.tar.xz) = 5faf349a9cc231c144c52de40f2a487a935c6f6146614547e64cabb26f037a23
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
We run cargo update during USES=cargo ports builds to update specific
crates and patch Cargo.lock for us. For normal crates this is based
on what's available in the vendor dir. For Git sources this pulls
new changes from the net instead even if we replace the source with
a static path in a patch section in the config file. Add a hack
to skip this.

This is for experimentation to solve [1]. For this to maybe be
useful for USES=cargo, the patch-in-config feature also needs to
be stabilized first. It will be available in Rust 1.56.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256581

--- src/tools/cargo/src/cargo/sources/git/source.rs.orig 2021-10-04 20:59:57 UTC
+++ src/tools/cargo/src/cargo/sources/git/source.rs
@@ -84,6 +84,9 @@ impl<'cfg> Debug for GitSource<'cfg> {

impl<'cfg> Source for GitSource<'cfg> {
fn query(&mut self, dep: &Dependency, f: &mut dyn FnMut(Summary)) -> CargoResult<()> {
+ if std::env::var("CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE").is_ok() {
+ return Ok(());
+ }
let src = self
.path_source
.as_mut()
@@ -92,6 +95,9 @@ impl<'cfg> Source for GitSource<'cfg> {
}

fn fuzzy_query(&mut self, dep: &Dependency, f: &mut dyn FnMut(Summary)) -> CargoResult<()> {
+ if std::env::var("CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE").is_ok() {
+ return Ok(());
+ }
let src = self
.path_source
.as_mut()
@@ -112,6 +118,9 @@ impl<'cfg> Source for GitSource<'cfg> {
}

fn update(&mut self) -> CargoResult<()> {
+ if std::env::var("CARGO_FREEBSD_PORTS_SKIP_GIT_UPDATE").is_ok() {
+ return Ok(());
+ }
let git_path = self.config.git_path();
let git_path = self.config.assert_package_cache_locked(&git_path);
let db_path = git_path.join("db").join(&self.ident);

0 comments on commit d6b6cae

Please sign in to comment.