found 513685 2.10.70 thanks On Wed, 2011-02-09 at 08:39 +0000, Debian Bug Tracking System wrote:
> #513685: [rmadison] Please use the return code more This fix didn't actually fix what the original bug report was about, reopening it due to the following cases being broken: pabs@chianamo:~$ rmadison foo ; echo $? 0 pabs@chianamo:~$ echo 127.0.0.1 qa.debian.org | sudo tee -a /etc/hosts [sudo] password for pabs: 127.0.0.1 qa.debian.org pabs@chianamo:~$ rmadison foo ; echo $? curl: (7) couldn't connect to host 1 pabs@chianamo:~$ rmadison nsis ; echo $? curl: (7) couldn't connect to host 1 I would expect the following: pabs@chianamo:~$ rmadison foo ; echo $? 1 pabs@chianamo:~$ echo 127.0.0.1 qa.debian.org | sudo tee -a /etc/hosts [sudo] password for pabs: 127.0.0.1 qa.debian.org pabs@chianamo:~$ rmadison foo ; echo $? curl: (7) couldn't connect to host 2 pabs@chianamo:~$ rmadison nsis ; echo $? curl: (7) couldn't connect to host 2 > > Please make rmadison give a sensible return value. Currently it only > > returns success, even when it couldn't contact the qa script. IMO the > > only of the following situations where it should return success is the > > second one. I think it should also differentiate between not being able > > to contact the server and not finding the requested package. See below > > for suggested return values in various scenarios. > > > > pabs@chianamo:~$ rmadison foo ; echo $? > > 0 > > > > I suggest returning 1 instead. > > > > pabs@chianamo:~$ rmadison nsis ; echo $? > > nsis | 2.19-3 | etch-m68k | source, m68k > > nsis | 2.19-3 | stable | source, alpha, amd64, hppa, i386, > > ia64, mips, mipsel, powerpc, s390, sparc > > nsis | 2.37-3 | testing | source, amd64, i386 > > nsis | 2.37-3 | unstable | source, amd64, i386 > > nsis | 2.39-1 | experimental | source, amd64, i386 > > 0 > > > > Returning success here makes sense. > > > > pabs@chianamo:~$ rmadison foo ; echo $? > > curl: (6) Couldn't resolve host 'qa.debian.org' > > 0 > > > > I suggest returning 2 instead. > > > > pabs@chianamo:~$ rmadison nsis ; echo $? > > curl: (6) Couldn't resolve host 'qa.debian.org' > > 0 > > > > I suggest returning 2 instead. -- bye, pabs http://wiki.debian.org/PaulWise
signature.asc
Description: This is a digitally signed message part