summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2024-11-28 18:25:02 +0000
committerJulian Andres Klode <jak@debian.org>2024-11-28 18:25:02 +0000
commit46e45bf1f4658075f87985d543414e45186e72d2 (patch)
tree7259447c78be773163b348c196f9a59577f40427 /cmdline
parent8d66ab29191c59baac04ef89fac30630cf9535e9 (diff)
parent86f8353ce7a343db7b19422db0d37379ac45ff4e (diff)
Merge branch 'prep-bye-apt-key' into 'main'
Stop using apt-key See merge request apt-team/apt!407
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-key.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 99a31bdd1..dd1c52ab0 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -312,7 +312,7 @@ is_supported_keyring() {
return 0
fi
local FILEEXT="${1##*.}"
- if [ "$FILEEXT" = 'gpg' ]; then
+ if [ "$FILEEXT" = 'gpg' -o "$FILEEXT" = 'pub' ]; then
# 0x98, 0x99 and 0xC6 via octal as hex isn't supported by dashs printf
if printf '\231' | cmp -s -n 1 - "$1"; then
true
@@ -470,7 +470,9 @@ dearmor_filename() {
fi
}
catfile() {
- cat "$(dearmor_filename "$1")" >> "$2"
+ if accessible_file_exists "$1" && is_supported_keyring "$1"; then
+ cat "$(dearmor_filename "$1")" >> "$2"
+ fi
}
merge_all_trusted_keyrings_into_pubring() {