bootstrap: always use commit info file instead of checking .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>
Tue, 29 Oct 2024 12:18:35 +0000 (13:18 +0100)
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 4957de2e1b791f9c862abab28089e7c8229958c7..1bdc9659aeb4d5e0a940720b4c75bcb0fe00acb5 100644 (file)
@@ -1013,8 +1013,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
         {
             builder.require_and_update_all_submodules();
 
index 3ae512ef7f1c270a666394fbbd8ce83f218a99a3..fbc3472e1ac2b1b1b697ac58a8f3114b860ae86a 100644 (file)
@@ -36,12 +36,13 @@ pub struct Info {
 impl GitInfo {
     pub fn new(omit_git_hash: bool, dir: &Path) -> GitInfo {
         // See if this even begins to look like a git dir
-        if !dir.join(".git").exists() {
+        // Debian: always use commit info file, since our .git is not upstreams..
+        //if !dir.join(".git").exists() {
             match read_commit_info_file(dir) {
                 Some(info) => return GitInfo::RecordedForTarball(info),
                 None => return GitInfo::Absent,
             }
-        }
+        //}
 
         // Make sure git commands work
         match helpers::git(Some(dir)).arg("rev-parse").as_command_mut().output() {