[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#742611: apt-cache: showsrc non-existent returning 0



Hi,

On Tue, Mar 25, 2014 at 02:32:08PM +0100, Maximiliano Curia wrote:
> apt-cache showsrc non-existent shows a W and a N message and returns 0, while
> apt-cache show non-existent shows a W and an E message and returns 100.
>
> The show approach makes it easier for scripts that rely on apt-cache, so I'm
> attaching a simple patch for showsrc for this.

I was remembering something in this regard, so I fired up 'git blame'
and it tells me two things:
Mar 2010: Change behavior of showsrc to match the one of show by Julian
 (aka: show a message at all!)
Jul 2010: downgrade from Error to Notice by me
 (which btw is also the case for show if you happen to provide a
  virtual package for the following reasons – consistency for the win!)

The later is part of a series of commits downgrading Errors to Notices
(again), because we uncovered that e.g. sbuild and launchpad were
falling over these changes. I haven't checked if this is still the
case, but I tend to assume the answer is yes. I guess a code search
would uncover a billion other cases, just like it is the case in terms
of surprises you get while searching for 'sources.list' "parsers"…


So while this would make sense, we hadn't the energy to push this hard
enough. I guess a plan would be to:
1. add an option (default disabled) to promote them to errors again
   ( -o apt::some::thing=true/false can be added at will )
2. change sbuild, launchpad, … to use this option if needed
3. change the default of the option to enabled
4. add the option to all the software forgotten in 2.

I would accept a patch for 1. in jessie, so that if all known things in
2. can get fixed (one way or the other) to cope with 3. in jessie+1, but
that needs someone who wants to work on it… volunteers?


Best regards

David Kalnischkies

Attachment: signature.asc
Description: Digital signature


Reply to: