diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:10 +0000 |
commit | 33959d52342e96f199678f72bdafad6a47544e44 (patch) | |
tree | f6029dee9bc90fd22849050de9780e63b880c90b /debian/patches/u-fix-get-toml-when-test.patch | |
parent | Merging upstream version 1.68.2+dfsg1. (diff) | |
download | rustc-debian/1.68.2+dfsg1-1.tar.xz rustc-debian/1.68.2+dfsg1-1.zip |
Adding debian version 1.68.2+dfsg1-1.debian/1.68.2+dfsg1-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/u-fix-get-toml-when-test.patch')
-rw-r--r-- | debian/patches/u-fix-get-toml-when-test.patch | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/debian/patches/u-fix-get-toml-when-test.patch b/debian/patches/u-fix-get-toml-when-test.patch index a9dd0fee0..2b170977c 100644 --- a/debian/patches/u-fix-get-toml-when-test.patch +++ b/debian/patches/u-fix-get-toml-when-test.patch @@ -8,28 +8,29 @@ Last-Update: 2023-03-29 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs -@@ -907,9 +907,9 @@ - - config.stage0_metadata = t!(serde_json::from_slice::<Stage0Metadata>(&stage0_json)); +@@ -823,9 +823,9 @@ + } + pub fn parse(args: &[String]) -> Config { - #[cfg(test)] + /*#[cfg(test)] - let get_toml = |_| TomlConfig::default(); + let get_toml = |_: &_| TomlConfig::default(); - #[cfg(not(test))] + #[cfg(not(test))]*/ let get_toml = |file: &Path| { let contents = t!(fs::read_to_string(file), format!("config file {} not found", file.display())); -@@ -907,7 +907,22 @@ +@@ -834,7 +834,23 @@ match toml::from_str(&contents) .and_then(|table: toml::Value| TomlConfig::deserialize(table)) { - Ok(table) => table, -+ /// Debian: We use previous version as a custom rustc, which unfortunately won't be -+ /// picked up because config.toml isn't read when cfg!(test). Making tests use the -+ /// entirety of our config.toml isn't feasible either as it panicks on GitRepo::Llvm -+ /// (d-bootstrap-custom-debuginfo-path.patch), so only give paths of initial rustc -+ /// and cargo. ++ // Debian: We use previous version as a custom rustc, which ++ // unfortunately won't be picked up because config.toml isn't ++ // read when cfg!(test). Making tests use the entirety of our ++ // config.toml isn't feasible either as it panicks on ++ // GitRepo::Llvm (d-bootstrap-custom-debuginfo-path.patch), so ++ // only give paths of initial rustc and cargo. + Ok(table) => if !cfg!(test) || table.build.is_none() { + table + } else { |