Hi, Am Freitag, den 19.10.2012, 21:23 +0200 schrieb David Kalnischkies: > Why do you need that information? I want to predict whether a package will build, using dose-debbuildcheck, which expects exactly one Packages file. > And why is simple cat'ing the Packages > files in /var/lib/apt/lists together not an option? (okay, not failsafe, > as it will not work with file:///, but beside that it should be fine) It is a work-around, and it seems to even work with file:// urls, but it would fail if the files there would not have empty lines at the bottom. Here is what I do right now: schroot -c $schroot -- bash -c "cat /var/lib/apt/lists/*Packages" > Packages installable=$(dose-builddebcheck -s --deb-native-arch=amd64 Packages Sources|perl -ne 'print "$1\n" if /package: src%3a(.*)/') > I guess it should be easy to get it with some lines out of python-apt or > with "misusing" EDSP (apt-get dist-upgrade -s --solver=dump) which has > a similar format. Both should be faster than: apt-cache show .* > (if multi-arch is involved, you have to say .*:arch1 .*:arch2 … > as arch globing doesn't work yet if we deal with packagename regexes) > > Depends a bit on how and why you need that info at all though. For now, the hack above works good enough. It would be nice to have this provided by apt somehow. I figure it is also useful for a lot of ad-hoc grep-dctrl scripting foo. Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata
Attachment:
signature.asc
Description: This is a digitally signed message part