Package: rustc / 1.46.0+dfsg1-1

d-read-beta-version-from-file.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -985,15 +985,13 @@
             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();