Don't check for cargo-vendor when building from (Debian's) git
authorMatthijs van Otterdijk <matthijs@wirevirt.net>
Thu, 4 Aug 2022 07:50:12 +0000 (08:50 +0100)
committerEmilio Pozuelo Monfort <pochu@debian.org>
Thu, 4 Aug 2022 07:50:12 +0000 (08:50 +0100)
Forwarded: not-needed

Forwarded: not-needed
Gbp-Pq: Name d-bootstrap-disable-git.patch

src/bootstrap/channel.rs
src/bootstrap/dist.rs

index 6478578c3c402cd3ab6625d8cb60729aa50b7c4a..774d71d6cc45d3252b5eb259f4807b7cb2795b51 100644 (file)
@@ -30,7 +30,11 @@ pub struct Info {
 impl GitInfo {
     pub fn new(ignore_git: bool, dir: &Path) -> GitInfo {
         // See if this even begins to look like a git dir
-        if !dir.join(".git").exists() {
+        //
+        // Debian: force-enabling this block 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.
+        if true || !dir.join(".git").exists() {
             return GitInfo::Absent;
         }
 
index 7d9b3da48ecb0578e12720eddb115844ecea3b66..6b94748e9a301bc0194140e53c9c4f0e223a0bd9 100644 (file)
@@ -912,7 +912,10 @@ impl Step for PlainSourceTarball {
         }
 
         // If we're building from git sources, we need to vendor a complete distribution.
-        if builder.rust_info.is_git() {
+        //
+        // Debian: disabling this block because the debian package is also in a git
+        //         repository, but cargo-vendor should not be installed or run.
+        if false && builder.rust_info.is_git() {
             // Vendor all Cargo dependencies
             let mut cmd = Command::new(&builder.initial_cargo);
             cmd.arg("vendor")