apt-cache's return code should be != 0 if source package could not be found

Bug #1037521 reported by Daniel Holbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

daniel@daydream:~$ apt-cache show gedit> /dev/null; echo $?
0
daniel@daydream:~$ apt-cache showsrc gedit> /dev/null; echo $?
0

daniel@daydream:~$ LC_ALL=C apt-cache show gedita> /dev/null; echo $?
E: No packages found
100
daniel@daydream:~$ LC_ALL=C apt-cache showsrc gedita> /dev/null; echo $?
W: Unable to locate package gedita
0

Maybe it should return 100 as well for a non-existing source package.

Related branches

Changed in apt (Ubuntu):
assignee: nobody → Daniel Holbach (dholbach)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Daniel Holbach (dholbach) wrote :

Apparently sbuild seems to rely on this return code....

Changed in apt (Ubuntu):
status: Fix Committed → Confirmed
Changed in apt (Ubuntu):
assignee: Daniel Holbach (dholbach) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.