On Sat, Dec 22, 2012 at 06:11:23PM +0800, David Smith wrote: > Package: apt-cacher > Version: 1.7.6 > Severity: normal > > > # /usr/share/apt-cacher/apt-cacher-precache.pl --help > > USAGE: /usr/share/apt-cacher/apt-cacher-precache.pl [ options ] > Options: > -d, --dist-filter=RE Perl regular experession, applied to the URL of > Packages > files to select only special versions. Example: > 'sid|unstable|experimental' > (default: 'testing|etch') > -q, --quiet suppress verbose output > -l, --list-dir=DIR also use pure/compressed files from the specified dir > (eg. /var/log/apt-cacher) to get the package names > from. > Words before | are ignored (in apt-cacher logs). To > create a such list from clients, see below. > -p, --by-priority=RE Perl regular expression for priorities to be looked for > when selecting packages. Implies threating all packages > with this priority as installation candidates. > (default: scanning the cache for candidates without > looking at priority) > > NOTE: the options may change in the future. > You can feed existing package lists or old apt-cacher logs into the selection > algorithm by using the -l option above. If the version is omited (eg. for > lists > created with "dpkg --get-selections" then the packages may be redownloaded). > To avoid this, use following one-liner to fake a list with version infos: > > dpkg -l | perl -ne 'if(/^(i.|.i)\s+(\S+)\s+(\S+)/) { print > "$2_$3_i386.deb\n$2_$3_all.deb\n"}' > > > > > > > > If you take a look at this "one-liner" it artificially implants "i386" and > "all" into package names. > If run this "one-liner" on an AMD64 system, it generates the incorrect package > names for the system.
If you install libdpkg-perl is this better? perl -MDpkg::Arch -ne '$arch=Dpkg::Arch::get_host_arch; if(/^(i.|.i)\s+(\S+)\s+(\S+)/) { print "$2_$3_$arch.deb\n$2_$3_all.deb\n"}' Mark -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org