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)
committerJeremy Bícha <jbicha@ubuntu.com>
Mon, 26 Jun 2023 21:16:27 +0000 (22:16 +0100)
Forwarded: not-needed

Forwarded: not-needed

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

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

index 1932a0017ee255e5539b8901401c6ecd2efd9350..7974630106b50306701726be791bc500504693cf 100644 (file)
@@ -29,7 +29,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 1a59b3958f1060844999fa0dac6ab6e7f30c3807..3c6fa744e0192b45bb2f06a9e4fdeceb1de2bcd2 100644 (file)
@@ -902,7 +902,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() {
             // Ensure we have the submodules checked out.
             builder.update_submodule(Path::new("src/tools/rust-analyzer"));