If we have an error message, the exit code should be non-zero, but we
can't do this without surprising users (read: scripts).

While it might not be perfect, it is at least not wrong as 'del' does in
this situation what it is supposed to do: remove the key from the
keyring. This is a trivial task of course if the key isn't present
before, but so it be: After the request the key is (still) removed.

Are you needing this for anything or was it just "surprising the first
time round"?

Note btw that the remove_key_from_keyring function is called multiple
times with different keyrings as keys can (not) be in different keyrings
nowadays which all need to be inspected, so apt-key would have to keep
track of how often it has nuked a key from a keyring so far adding lots
of code for the small gain of printing an error message telling me that
I wasted precious lifetime typing a command which boiled down to being a
no-operation (and wasted another bunch of seconds on reading the error
message).

[Bad enough that it prints "OK". It should really be silent…]

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1256565

Title:
  apt-key del gives wrong message if key is not in keyring

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1256565/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to