]> git.proxmox.com Git - rustc.git/commitdiff
properly drop more components
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 13 Sep 2023 13:32:43 +0000 (15:32 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 14 Sep 2023 08:39:11 +0000 (10:39 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/patches/d-0000-ignore-removed-submodules.patch

index 54e14552471014e4d7e935736d6289912bbcef7d..1d1ec889ac9f6fc6cf1e4d44d8bb8b0a4a51390b 100644 (file)
@@ -14,10 +14,10 @@ Subject: d-0000-ignore-removed-submodules
  src/tools/tidy/src/deps.rs         |  4 +++-
  9 files changed, 15 insertions(+), 62 deletions(-)
 
-diff --git a/Cargo.toml b/Cargo.toml
-index 1fcaaf6..4c2a1be 100644
---- a/Cargo.toml
-+++ b/Cargo.toml
+Index: rust/Cargo.toml
+===================================================================
+--- rust.orig/Cargo.toml
++++ rust/Cargo.toml
 @@ -18,29 +18,15 @@ members = [
    "src/tools/tidy",
    "src/tools/tier-check",
@@ -58,10 +58,10 @@ index 1fcaaf6..4c2a1be 100644
  
  # See comments in `library/rustc-std-workspace-core/README.md` for what's going on
  # here
-diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
-index 0251452..807de4d 100644
---- a/src/bootstrap/bootstrap.py
-+++ b/src/bootstrap/bootstrap.py
+Index: rust/src/bootstrap/bootstrap.py
+===================================================================
+--- rust.orig/src/bootstrap/bootstrap.py
++++ rust/src/bootstrap/bootstrap.py
 @@ -781,10 +781,6 @@ class RustBuild(object):
          args = [self.cargo(), "build", "--manifest-path",
                  os.path.join(self.rust_root, "src/bootstrap/Cargo.toml")]
@@ -73,23 +73,73 @@ index 0251452..807de4d 100644
          if self.get_toml("metrics", "build"):
              args.append("--features")
              args.append("build-metrics")
-diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
-index e959ea0..77ab42c 100644
---- a/src/bootstrap/builder.rs
-+++ b/src/bootstrap/builder.rs
-@@ -662,8 +662,6 @@ impl<'a> Builder<'a> {
-                 tool::RemoteTestClient,
+Index: rust/src/bootstrap/builder.rs
+===================================================================
+--- rust.orig/src/bootstrap/builder.rs
++++ rust/src/bootstrap/builder.rs
+@@ -491,20 +491,20 @@ impl<'a> ShouldRun<'a> {
+         static SUBMODULES_PATHS: OnceCell<Vec<String>> = OnceCell::new();
+         let init_submodules_paths = |src: &PathBuf| {
+-            let file = File::open(src.join(".gitmodules")).unwrap();
++            //let file = File::open(src.join(".gitmodules")).unwrap();
+             let mut submodules_paths = vec![];
+-            for line in BufReader::new(file).lines() {
+-                if let Ok(line) = line {
+-                    let line = line.trim();
+-
+-                    if line.starts_with("path") {
+-                        let actual_path =
+-                            line.split(' ').last().expect("Couldn't get value of path");
+-                        submodules_paths.push(actual_path.to_owned());
+-                    }
+-                }
+-            }
++            //for line in BufReader::new(file).lines() {
++            //    if let Ok(line) = line {
++            //        let line = line.trim();
++
++            //        if line.starts_with("path") {
++            //            let actual_path =
++            //                line.split(' ').last().expect("Couldn't get value of path");
++            //            submodules_paths.push(actual_path.to_owned());
++            //        }
++            //    }
++            //}
+             submodules_paths
+         };
+@@ -658,24 +658,13 @@ impl<'a> Builder<'a> {
+                 tool::Linkchecker,
+                 tool::CargoTest,
+                 tool::Compiletest,
+-                tool::RemoteTestServer,
+-                tool::RemoteTestClient,
                  tool::RustInstaller,
-                 tool::Cargo,
+-                tool::Cargo,
 -                tool::Rls,
 -                tool::RustAnalyzer,
                  tool::RustAnalyzerProcMacroSrv,
                  tool::RustDemangler,
                  tool::Rustdoc,
-@@ -684,10 +682,6 @@ impl<'a> Builder<'a> {
+                 tool::Clippy,
+                 tool::CargoClippy,
+-                llvm::Llvm,
+-                llvm::Sanitizers,
+                 tool::Rustfmt,
+-                tool::Miri,
+-                tool::CargoMiri,
+-                llvm::Lld,
+-                llvm::CrtBeginEnd
+             ),
+             Kind::Check | Kind::Clippy | Kind::Fix => describe!(
+                 check::Std,
+@@ -683,11 +672,6 @@ impl<'a> Builder<'a> {
+                 check::Rustdoc,
                  check::CodegenBackend,
                  check::Clippy,
-                 check::Miri,
+-                check::Miri,
 -                check::CargoMiri,
 -                check::MiroptTestTools,
 -                check::Rls,
@@ -97,15 +147,24 @@ index e959ea0..77ab42c 100644
                  check::Rustfmt,
                  check::Bootstrap
              ),
-@@ -718,7 +712,6 @@ impl<'a> Builder<'a> {
+@@ -717,8 +701,6 @@ impl<'a> Builder<'a> {
+                 test::TierCheck,
                  test::ReplacePlaceholderTest,
                  test::Cargotest,
-                 test::Cargo,
+-                test::Cargo,
 -                test::RustAnalyzer,
                  test::ErrorIndex,
                  test::Distcheck,
                  test::RunMakeFullDeps,
-@@ -767,11 +760,8 @@ impl<'a> Builder<'a> {
+@@ -734,7 +716,6 @@ impl<'a> Builder<'a> {
+                 test::EmbeddedBook,
+                 test::EditionGuide,
+                 test::Rustfmt,
+-                test::Miri,
+                 test::Clippy,
+                 test::RustDemangler,
+                 test::CompiletestTest,
+@@ -767,11 +748,8 @@ impl<'a> Builder<'a> {
                  doc::RustdocBook,
                  doc::RustByExample,
                  doc::RustcBook,
@@ -117,24 +176,42 @@ index e959ea0..77ab42c 100644
                  doc::EmbeddedBook,
                  doc::EditionGuide,
                  doc::StyleGuide,
-@@ -788,8 +778,6 @@ impl<'a> Builder<'a> {
+@@ -787,13 +765,9 @@ impl<'a> Builder<'a> {
+                 dist::RustcDev,
                  dist::Analysis,
                  dist::Src,
-                 dist::Cargo,
+-                dist::Cargo,
 -                dist::Rls,
 -                dist::RustAnalyzer,
                  dist::Rustfmt,
                  dist::RustDemangler,
                  dist::Clippy,
-@@ -810,7 +798,6 @@ impl<'a> Builder<'a> {
+-                dist::Miri,
+                 dist::LlvmTools,
+                 dist::RustDev,
+                 dist::Bootstrap,
+@@ -809,12 +783,9 @@ impl<'a> Builder<'a> {
+             Kind::Install => describe!(
                  install::Docs,
                  install::Std,
-                 install::Cargo,
+-                install::Cargo,
 -                install::RustAnalyzer,
                  install::Rustfmt,
                  install::RustDemangler,
                  install::Clippy,
-@@ -1949,10 +1936,7 @@ impl<'a> Builder<'a> {
+-                install::Miri,
+                 install::LlvmTools,
+                 install::Src,
+                 install::Rustc
+@@ -824,7 +795,6 @@ impl<'a> Builder<'a> {
+                 run::BuildManifest,
+                 run::BumpStage0,
+                 run::ReplaceVersionPlaceholder,
+-                run::Miri,
+                 run::CollectLicenseMetadata,
+                 run::GenerateCopyright,
+             ),
+@@ -1949,10 +1919,7 @@ impl<'a> Builder<'a> {
              }
          }
  
@@ -146,10 +223,10 @@ index e959ea0..77ab42c 100644
              cargo.arg("--frozen");
          }
  
-diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
-index 9ad98eb..3c6ac96 100644
---- a/src/bootstrap/doc.rs
-+++ b/src/bootstrap/doc.rs
+Index: rust/src/bootstrap/doc.rs
+===================================================================
+--- rust.orig/src/bootstrap/doc.rs
++++ rust/src/bootstrap/doc.rs
 @@ -76,7 +76,6 @@ macro_rules! book {
  // FIXME: Make checking for a submodule automatic somehow (maybe by having a list of all submodules
  // and checking against it?).
@@ -158,10 +235,10 @@ index 9ad98eb..3c6ac96 100644
      ClippyBook, "src/tools/clippy/book", "clippy";
      EditionGuide, "src/doc/edition-guide", "edition-guide", submodule;
      EmbeddedBook, "src/doc/embedded-book", "embedded-book", submodule;
-diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
-index aedf1ec..2ade9c4 100644
---- a/src/bootstrap/test.rs
-+++ b/src/bootstrap/test.rs
+Index: rust/src/bootstrap/test.rs
+===================================================================
+--- rust.orig/src/bootstrap/test.rs
++++ rust/src/bootstrap/test.rs
 @@ -2070,17 +2070,7 @@ impl Step for RustcGuide {
      }
  
@@ -181,10 +258,10 @@ index aedf1ec..2ade9c4 100644
      }
  }
  
-diff --git a/src/tools/clippy/Cargo.toml b/src/tools/clippy/Cargo.toml
-index c35dfcb..a24d2f4 100644
---- a/src/tools/clippy/Cargo.toml
-+++ b/src/tools/clippy/Cargo.toml
+Index: rust/src/tools/clippy/Cargo.toml
+===================================================================
+--- rust.orig/src/tools/clippy/Cargo.toml
++++ rust/src/tools/clippy/Cargo.toml
 @@ -36,11 +36,6 @@ walkdir = "2.3"
  # This is used by the `collect-metadata` alias.
  filetime = "0.2"
@@ -197,10 +274,10 @@ index c35dfcb..a24d2f4 100644
  # UI test dependencies
  clap = { version = "4.1.4", features = ["derive"] }
  clippy_utils = { path = "clippy_utils" }
-diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml
-index 333f03c..2a0faa2 100644
---- a/src/tools/rust-analyzer/Cargo.toml
-+++ b/src/tools/rust-analyzer/Cargo.toml
+Index: rust/src/tools/rust-analyzer/Cargo.toml
+===================================================================
+--- rust.orig/src/tools/rust-analyzer/Cargo.toml
++++ rust/src/tools/rust-analyzer/Cargo.toml
 @@ -1,5 +1,14 @@
  [workspace]
 -members = ["xtask/", "lib/*", "crates/*"]
@@ -217,10 +294,10 @@ index 333f03c..2a0faa2 100644
  exclude = ["crates/proc-macro-test/imp"]
  
  [workspace.package]
-diff --git a/src/tools/rustfmt/Cargo.toml b/src/tools/rustfmt/Cargo.toml
-index 87ce59d..12ed654 100644
---- a/src/tools/rustfmt/Cargo.toml
-+++ b/src/tools/rustfmt/Cargo.toml
+Index: rust/src/tools/rustfmt/Cargo.toml
+===================================================================
+--- rust.orig/src/tools/rustfmt/Cargo.toml
++++ rust/src/tools/rustfmt/Cargo.toml
 @@ -59,11 +59,6 @@ unicode_categories = "0.1"
  
  rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }
@@ -233,11 +310,11 @@ index 87ce59d..12ed654 100644
  # Rustc dependencies are loaded from the sysroot, Cargo doesn't know about them.
  
  [package.metadata.rust-analyzer]
-diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
-index a9eb6c8..2d4f578 100644
---- a/src/tools/tidy/src/deps.rs
-+++ b/src/tools/tidy/src/deps.rs
-@@ -337,7 +337,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&str] = &[
+Index: rust/src/tools/tidy/src/deps.rs
+===================================================================
+--- rust.orig/src/tools/tidy/src/deps.rs
++++ rust/src/tools/tidy/src/deps.rs
+@@ -337,7 +337,7 @@ const FORBIDDEN_TO_HAVE_DUPLICATES: &[&s
      // This crate takes quite a long time to build, so don't allow two versions of them
      // to accidentally sneak into our dependency graph, in order to ensure we keep our CI times
      // under control.
@@ -246,7 +323,7 @@ index a9eb6c8..2d4f578 100644
  ];
  
  /// Dependency checks.
-@@ -613,6 +613,8 @@ fn direct_deps_of<'a>(metadata: &'a Metadata, pkg_id: &'a PackageId) -> Vec<&'a
+@@ -613,6 +613,8 @@ fn direct_deps_of<'a>(metadata: &'a Meta
  }
  
  fn check_rustfix(metadata: &Metadata, bad: &mut bool) {