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 Gruenbichler <f.gruenbichler@proxmox.com>
Mon, 5 Sep 2022 08:03:18 +0000 (09:03 +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 f5ae8103cb057fff8d3a57d9309be8f9e16864f8..9b3785b674f8798e95a5f93d019355204b2f25ec 100644 (file)
@@ -895,7 +895,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")