diff options
Diffstat (limited to 'src/shims')
| -rw-r--r-- | src/shims/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shims/mod.rs b/src/shims/mod.rs index a34cf7d..c1b169c 100644 --- a/src/shims/mod.rs +++ b/src/shims/mod.rs @@ -247,7 +247,7 @@ pub fn mkarchroot(args: &[String]) -> Result<i32, String> { Ok(0) } -/// `makechrootpkg -c -r <chroot> -- -si<key> -f`, run with cwd = the build dir. +/// `makechrootpkg -c -r <chroot> -- -f`, run with cwd = the build dir. /// /// Emits one `.pkg.tar.zst` per package in the manifest into the current /// directory, exactly where the real tool leaves them. @@ -281,10 +281,15 @@ pub fn makechrootpkg(args: &[String], m: &Manifest) -> Result<i32, String> { )); } let pkgs = packages_to_emit(m, &startdir); + // Sign only when the caller asked for it, like the real tool: signing is + // `-si<key>`/`-i`, and the pipeline stopped passing it when signing moved + // hub-side to ingest. A shim that signed anyway would hide that move from + // every test in the suite. + let wants_sig = args.iter().any(|a| a.starts_with("-si") || a == "-i" || a == "--sign"); for p in &pkgs { let path = write_package(&startdir, p, m)?; println!("==> Creating package '{}'", path.file_name().unwrap().to_string_lossy()); - if m.sig { + if m.sig && wants_sig { if let Ok(bytes) = std::fs::read(&path) { let sig = path.with_extension("pkg.tar.zst.sig"); let _ = std::fs::write(&sig, fake_sig(&bytes)); |
