Don't check for cargo-vendor when building from (Debian's) git
authorMatthijs van Otterdijk <matthijs@wirevirt.net>
Thu, 14 Jul 2022 11:17:38 +0000 (13:17 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Wed, 4 Sep 2024 18:13:19 +0000 (20:13 +0200)
Forwarded: not-needed

Gbp-Pq: Topic build
Gbp-Pq: Name d-bootstrap-disable-git.patch

src/bootstrap/src/core/build_steps/dist.rs
src/bootstrap/src/utils/channel.rs

index 91039d0c8dcc1fded7f4de664a8edaf2a243f984..f2793e496f21d3923863a8d56d9663c7ab88d0b5 100644 (file)
@@ -1007,8 +1007,10 @@ impl Step for PlainSourceTarball {
 
         // If we're building from git or tarball sources, we need to vendor
         // a complete distribution.
-        if builder.rust_info().is_managed_git_subrepository()
-            || builder.rust_info().is_from_tarball()
+        //
+        // Debian: short-circuited because the Debian package is also in a git
+        //         repository, but cargo-vendor should not be installed or run.
+        if false
         {
             // FIXME: This code looks _very_ similar to what we have in `src/core/build_steps/vendor.rs`
             // perhaps it should be removed in favor of making `dist` perform the `vendor` step?
index 88988c33916171fac23a3b51417553ebf99f784d..e5c6cd104e29920bf0cb8da3fc7c6e269e6baaa7 100644 (file)
@@ -35,6 +35,12 @@ pub struct Info {
 
 impl GitInfo {
     pub fn new(omit_git_hash: bool, dir: &Path) -> GitInfo {
+        //
+        // Debian: returning early because the Debian package is also in a git
+        //         repository, but we don't want to parse gitinfo. This is
+        //         needed for the bootstrap tests to work which running for
+        //         Debian git.
+        return GitInfo::Absent;
         // See if this even begins to look like a git dir
         if !dir.join(".git").exists() {
             match read_commit_info_file(dir) {