On Sun, Jul 12, 2009 at 04:40:52PM +0200, Francesco Poli wrote: > On Sun, 12 Jul 2009 00:08:43 +0200 Francesco Poli wrote: > > > On Sat, 11 Jul 2009 14:51:59 -0700 Ryan Niebur wrote: > > > > [...] > > > On Sat, Jul 11, 2009 at 11:31:07PM +0200, Francesco Poli wrote: > > [...] > > > > Well, I am not sure that this proposed new behavior (i.e.: exit with > > > > non-zero status when a package does not exist) is a good idea. > > [...] > > > > The cron.daily job would try to > > > > run /usr/share/apt-listbugs/aptcleanup, which would exit with error, > > > > and hence the pinnings in /etc/apt/preferences would not be properly > > > > cleaned up... > > > > > > > > > > this is why we would have to adapt aptcleanup as well.. > > > > Fair enough. > > > > Just please make sure that apt-listbugs exits with a special unique > > (non-zero) exit status, then, so that we can easily distinguish this > > kind of error from other ones... > > Ryan, another thing I've just realized: suppose a user has some > unofficial repositories in /etc/apt/sources.list and installs or > upgrades packages which are not present in the official Debian > distribution; we want to avoid that the automatic > (via /etc/apt/apt.conf.d/10apt-listbugs) "apt-listbugs apt" invocation > exits with errors just because the Debian BTS knows nothing about those > unofficial packages. > > As a consequence, I think the new behavior should be implemented for > the "list" command only, and not for the "apt" command. >
Hi Francesco, hi Ryan! the behavior I proposed seems to have consequences I was not aware of. motivation for the bugreport was solely the behaviour of apt-listbugs list ... using it from the command-line and not getting a warning about, say, a typo in package name, is confusing and may misslead the user. the automatic routine checks done when used in the "apt" mode are different. So at first glance I would agree with you, Francesco: Warning and non 0 return value for unknown packages only for the "list" command. On the other hand reading the documentation I would tend to assume "list" is for package names as arguments "apt" is for package names from stdin having this difference mixed up with different error handling may be confusing again. Maybe apt-listbugs should have an option for different error handling: to be used for additional automatic checking (together with apt) to be used for explicit bug database query: is this package known, are there any bugs? (not in apt context, for interactive usage) and then --for simplicity-- accept names on stdin and as arguments whatever the error handling is. Other way out could be to drop the list command, to have apt-listbugs only for what the manual already mentions: ... Especially, it is intended ... regards max.
signature.asc
Description: Digital signature