Craig Sanders writes ("lots of dpkg ideas for discussion (was Re: GCC frepo (continue))"): ... > if dpkg were to keep a list of all selected files and a list of > pathnames to available deb files, then it could simply iterate through > the list of selected packages.
The information is already in dpkg's status areas. If you take the first word from each Status: line in /var/lib/dpkg/status and copy it to the corresponding place on another machine you'll have copied the selectedness or otherwise of all the packages. Ian. (Wild crossposting and CCs removed.)