File: bootstrap-don-t-attempt-to-download-rustc-in-tests.patch

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 934,168 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (30 lines) | stat: -rw-r--r-- 1,255 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: =?utf-8?q?Fabian_Gr=C3=BCnbichler?= <debian@fabian.gruenbichler.email>
Date: Sat, 11 Jan 2025 16:37:16 +0100
Subject: bootstrap: don't attempt to download rustc in tests
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

the tests use a default config, so we need to manually override this
option..

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
---
 src/bootstrap/src/core/config/config.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 80c954b..2b29ffe 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -1639,6 +1639,10 @@ impl Config {
             build.cargo = build.cargo.take().or(std::env::var_os("CARGO").map(|p| p.into()));
             // Debian: don't optimize compiler-rt, the bundled sources are not available..
             build.optimized_compiler_builtins = Some(false);
+
+            if let Some(ref mut rust) = toml.rust {
+                rust.download_rustc = Some(StringOrBool::Bool(false));
+            }
         }
 
         if GitInfo::new(false, &config.src).is_from_tarball() && toml.profile.is_none() {