diff --git a/src/apt/keyring.rs b/src/apt/keyring.rs index 600287c..5688ce3 100644 --- a/src/apt/keyring.rs +++ b/src/apt/keyring.rs @@ -26,8 +26,12 @@ pub async fn download_trust_keyring( ctx.command("mkdir").arg("-p").arg(trusted_gpg_d).status()?; } - // Generate a filename for the keyring - let filename = format!("pkh-{}.gpg", series); + // Extract the original filename from the keyring URL + let filename = keyring_url + .split('/') + .next_back() + .unwrap_or("pkh-{}.gpg") + .replace("{}", series); let keyring_path = format!("{}/{}", trusted_gpg_d, filename); // Download the keyring directly to the final location using curl