On 2013-10-28, David Kalnischkies <[email protected]> wrote: >> If there are multiple CDROM drives, `apt-cdrom add` will abort with >> an error if any of the drives do not contain a Debian CD. This is >> particularly a problem if apt-cdrom happens to check a drive with no >> CD first. Then it will abort without even searching the other drives. > > I am not sure if ignoring errors is really a good idea. Maybe the > drive is empty or the CD has a million scratches, is upside down in > the slot or other "valid" error cases a user should be notified about.
My main concerns are: 1. That apt-cdrom doesn't check all the drives before giving up. 2. That apt-cdrom returns error code even if it was successful with one of the drives. The current behavior makes calling apt-cdrom very confusing if I have multiple drives and have my CD in the "wrong" drive. Or debian-installer (apt-setup) aborts with errors because apt-cdrom returns an error on one of the drives, even if it succeeded on other. > In any case, the patch doesn't apply as the code changed around 0.9.9. > Is this version still not trying all drives before erroring out > completely? I will try this and post results. > What we could do to collect the error messages without giving the > Add() calls a hint that previous invocations failed is: > _error->PushToStack() and the reverse _error->MergeWithStack(). I considered that as well. In the all-errors case this is definately a good approach. But in the case where at least 1 drive succeeds, I believe we should return success. The manpage for apt-cdrom states: "apt-cdrom is used to add *a* new CDROM to APTs list" So as long as *a* CDROM was added, I think it should return success. > If we are patching, there is similar code in DoIdent, > so this probably needs to be patched, too. Agreed. If 0.9.9 still has this problem I will address both in a new patch. John Ogness -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

