apt-cdrom should succeed if any drive succeeds
authorJohn Ogness <john.ogness@linutronix.de>
Fri, 13 Dec 2013 19:59:31 +0000 (20:59 +0100)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 12 Feb 2014 01:18:37 +0000 (02:18 +0100)
commit62dcbf84c4aee8cb01e40c594d4c7f3a23b64836
tree0438178b16facfd688bfcc7947d4b237c8481a34
parent246bbb611d4cd5e2a13ecffb6cbe0e76390eae6f
apt-cdrom should succeed if any drive succeeds

If there are multiple CD-ROM drives, `apt-cdrom add` will abort with an
error if any of the drives do not contain a Debian CD which is against
the documentation we have saying "a CD-ROM" and also scripts do not
expect it this way.

This patch modifies apt-cdrom to return success if any of the drives
succeeded. If failures occur, apt-cdrom will still continue trying all
the drives and report the last failure (if none of them succeeded).

The 'ident' command was also changed to match the new 'add' behavior.

Closes: 728153
apt-pkg/cdrom.cc
cmdline/apt-cdrom.cc