Hi there!

Yesterday evening I found a bug in debcheckout/devscripts, which
actually is caused by how `apt-cache showsrc $PKG` returns the different
versions (testing -> unstable -> experimental -> stable), completely
different from `apt-cache policy $PKG` (read below for examples).

It seems that I'm the only one who considers this as a bug: is there any
rationale behind this? And why not showing the same output as
`apt-cache policy $PKG`?

I decided to not cc: the BTS, but feel free to do so if you think it's

Thx, bye,
Gismo / Luca

----- Forwarded message from Luca Capello -----

Subject: Bug#477386: devscripts: [debcheckout] should check for repository on unstable
Reply-To: Luca Capello , 477386@bugs.debian.org
Resent-From: Luca Capello
Resent-To: debian-bugs-dist@lists.debian.org
Resent-CC: Luca Capello , Devscripts Devel Team
Resent-Date: Tue, 22 Apr 2008 20:27:01 +0000
X-Debian-PR-Message: report 477386
X-Debian-PR-Package: devscripts
X-Debian-PR-Source: devscripts
From: Luca Capello
To: Debian Bug Tracking System
Resent-Sender: Debian BTS
Resent-Date: Tue, 22 Apr 2008 20:27:04 +0000
X-Spam-Checker-Version: SpamAssassin 3.0.6 (2005-12-07) on dione.pcaserver.net
X-Spam-Status: No, score=-2.5 required=7.0 tests=AWL,BAYES_00 autolearn=ham

Package: devscripts
Version: 2.10.26
Severity: important


in case the output below wouldn't be self-explicative, it seems that
`apt-cache showsrc $PKG` doesn't return unstable versions first, which
renders debcheckout quite useless if you have more than unstable in your
apt sources.

luca@gismo:~/var/lib/git$ debcheckout -a cl-gd
can't use authenticated mode on repository \
'http://cl-debian.alioth.debian.org/repository/pvaneynd/cl-gd/' since \
it is not a known repository (e.g. alioth)

luca@gismo:~/var/lib/git$ apt-cache policy cl-gd
Installed: (none)
Candidate: 0.5.6-2
Version table:
0.5.6-2 0
990 http://cdn.debian.net sid/main Packages
0.5.6-1 0
500 http://cdn.debian.net testing/main Packages

luca@gismo:~/var/lib/git$ apt-cache showsrc cl-gd
Package: cl-gd
Binary: cl-gd
Version: 0.5.6-1
Vcs-Darcs: http://cl-debian.alioth.debian.org/r...vaneynd/cl-gd/

Package: cl-gd
Binary: cl-gd
Version: 0.5.6-2
Vcs-Git: http://git.debian.org/git/pkg-common-lisp/cl-gd.git

Package: cl-gd
Binary: cl-gd
Version: 0.5.1-1


I filed the bug to devscripts after a discussion on #d-devel:
[22:09:21] why `apt-cache showsrc $PKG` returns versions in a
different order than `apt-cache show $PKG`? i.e.,
not starting the latest in unstable
[22:09:49] not starting FROM the..., obviously
[22:10:21] they use two different indices
[22:11:16] madduck: well, this renders `debcheckout -a`
completely useless (and it's a bug IMHO)
[22:11:24] uh oh
[22:11:27] file it...
[22:11:32] that's not a bug in apt
[22:11:42] eigood: why?
[22:11:46] madduck: devscripts or apt?
[22:11:47] there is nothing that says what order apt should
output things in
[22:11:52] gismo: devscripts
[22:11:57] eigood: consistency?
[22:12:00] madduck: thx
[22:12:07] and, even then, what is available thru a 'deb'
line may not be in sync with a 'deb-src' line
[22:12:40] deb .... main
[22:12:46] deb-src ... pool ....
[22:12:50] deb-src .... contrib
[22:12:55] deb .... non-free
[22:12:58] deb-src ... main
[22:12:59] eigood: sure, but at least I'd like to have the
same order for both (i.e., from the more recent to
the oldest)
[22:13:00] etc
[22:13:18] eigood: anyway, I'm filing it for devscripts and
let's see then
[22:13:22] er, the second is supposed to be from snapshot
[22:14:22] eigood: can I quote you on the bug report?
[22:14:38] sure
[22:14:55] eigood: thx
[22:15:08] instead of having 2 lines, with main contrib
non-free, both deb/deb-src, an admin may split
those, and put them in some odd order
[22:15:20] in an ideal world, you could have 2 options in
such cases:
[22:15:37] order based on sources.list, or alphabetical
[22:15:53] increasing version number
[22:16:20] but in any event, it's not specified what should
be done
[22:16:44] eigood: it's neither of based on sources.list nor
alphabetical: it's testing -> unstable -> stable
[22:20:13] madduck: BTW, can I quote you, too?
[22:20:24] always
[22:20:44] though i didn't really contribute anything, did
[22:21:54] madduck: at least the choice of the package to file
the bug to ;-)

Thx, bye,
Gismo / Luca

-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages devscripts depends on:
ii debianutils 2.28.4 Miscellaneous utilities specific t
ii dpkg-dev 1.14.18 package building tools for Debian
ii libc6 2.7-10 GNU C Library: Shared libraries
ii perl 5.8.8-12 Larry Wall's Practical Extraction
ii sed 4.1.5-7 The GNU sed stream editor

Versions of packages devscripts recommends:
ii at Delayed job execution and batch pr
ii bsd-mailx [mailx] 8.1.2-0.20071201cvs-2 A simple mail user agent
pn build-essential (no description available)
ii bzr 1.3.1-1 easy to use distributed version co
ii curl 7.18.1-1 Get a file from an HTTP, HTTPSor
ii cvs 1:1.12.13-10 Concurrent Versions System
ii dctrl-tools 2.12 Command-line tools to process Debi
ii debian-keyring 2007.12.04 GnuPG (and obsolete PGP) keys of D
ii debian-maintainers 1.29 GPG keys of Debian maintainers
ii dput Debian package upload tool
pn equivs (no description available)
ii fakeroot 1.9.4 Gives a fake root environment
ii git-core 1: fast, scalable, distributed revisi
ii gnupg 1.4.6-2.1 GNU privacy guard - a free PGPrep
ii iceweasel [www-bro 3.0~b5-1 lightweight web browser based on M
pn libauthen-sasl-per (no description available)
pn libcrypt-ssleay-pe (no description available)
pn libfile-desktopent (no description available)
pn libparse-debcontro (no description available)
pn libsoap-lite-perl (no description available)
pn libterm-size-perl (no description available)
ii libtimedate-perl 1.1600-9 Time and date functions for Perl
ii liburi-perl 1.35.dfsg.1-1 Manipulates and accesses URI strin
pn libwww-perl (no description available)
ii lintian 1.23.46 Debian package checker
ii lsb-release 3.2-10 Linux Standard Base version report
ii man-db 2.5.1-3 on-line manual pager
ii openssh-client [ss 1:4.7p1-8 secure shell client, an rlogin/rsh
ii patch 2.5.9-5 Apply a diff file to an original
pn patchutils (no description available)
ii perl [libdigest-md 5.8.8-12 Larry Wall's Practical Extraction
ii strace 4.5.15-1.2 A system call tracer
ii subversion 1.4.6dfsg1-3 Advanced version control system
ii unzip 5.52-11 De-archiver for .zip files
ii w3m [www-browser] 0.5.1-5.1+b1 WWW browsable pager with excellent
pn wdiff (no description available)
ii wget 1.11.1-1 retrieves files from the web

-- no debconf information

----- End forwarded message -----

Version: GnuPG v1.4.6 (GNU/Linux)

1KvDV8l1nJT4Whd9mih2CFtoD8BQJ3EAq0JwPROl5LcmdrRKvZ QrtWLVZL4Avraj