summaryrefslogtreecommitdiff
path: root/cmdline/apt-key.in
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-02-06 17:56:28 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:12:14 +0200
commit33a2267214eed2a11281c9f93b8cf10b4c436d94 (patch)
treee239bc47e3e1f13fa5b8cf37235a2d91167aa2dd /cmdline/apt-key.in
parent0dae96a2b5e8ecd80a1b6e44961f1692ad4aec15 (diff)
add --readonly option for apt-key adv
Some advanced commands can be executed without the keyring being modified like --verify, so this adds an option to disable the mergeback and uses it for our gpg calling code. Git-Dch: Ignore
Diffstat (limited to 'cmdline/apt-key.in')
-rw-r--r--cmdline/apt-key.in9
1 files changed, 4 insertions, 5 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 9259fac0d..21d692631 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -337,20 +337,19 @@ while [ -n "$1" ]; do
shift
TRUSTEDFILE="$1"
FORCED_KEYRING="$1"
- shift
;;
--secret-keyring)
shift
FORCED_SECRET_KEYRING="$1"
- shift
+ ;;
+ --readonly)
+ merge_back_changes() { true; }
;;
--fakeroot)
requires_root() { true; }
- shift
;;
--quiet)
aptkey_echo() { true; }
- shift
;;
--*)
echo >&2 "Unknown option: $1"
@@ -359,6 +358,7 @@ while [ -n "$1" ]; do
*)
break;;
esac
+ shift
done
if [ -z "$TRUSTEDFILE" ]; then
@@ -430,7 +430,6 @@ case "$command" in
del|rm|remove)
requires_root
foreach_keyring_do 'remove_key_from_keyring' "$@"
- merge_back_changes
aptkey_echo "OK"
;;
update)