From: Debian Rust Maintainers Date: Tue, 8 Mar 2022 10:51:18 +0000 (+0000) Subject: d-bootstrap-read-beta-version-from-file X-Git-Tag: archive/raspbian/1.57.0+dfsg1-1+rpi1~1^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4a25f9ca1b5fdf53ce1fb2a9f0545e66d55fa6b3;p=rustc.git d-bootstrap-read-beta-version-from-file Gbp-Pq: Name d-bootstrap-read-beta-version-from-file.patch --- diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 2d4e152789..2f435601c5 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -1161,15 +1161,13 @@ impl Build { return s; } - // Figure out how many merge commits happened since we branched off master. - // That's our beta number! - // (Note that we use a `..` range, not the `...` symmetric difference.) + // Debian: read beta number from "version" file, this is only available + // in the rustc upstream tarballs and not their git let count = output( - Command::new("git") - .arg("rev-list") - .arg("--count") - .arg("--merges") - .arg("refs/remotes/origin/master..HEAD") + Command::new("sed") + .arg("-re") + .arg(r"s/[0-9]+.[0-9]+.[0-9]+-beta.([0-9]+) \(.*\)/\1/g") + .arg("version") .current_dir(&self.src), ); let n = count.trim().parse().unwrap();