On 20 October 2012 04:44, Joachim Breitner <nome...@debian.org> wrote: > 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.
There is sort-dctrl which would not fail in that case. It seems most (all?) tools are producing Packages files with two trailing newlines anyway. Sort-dctrl is also much faster than apt-cache show for this, and will not miss anything arch-wise (assuming Dir::State::Lists is at it's default value). > I figure it is also useful for a lot of ad-hoc > grep-dctrl scripting foo. No need to concatenate files for that. ? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org