On: Thu, 29 Oct 1998 23:21:24 +0100 Enrico Zini writes: > > Hello! > As my modem internet connection is slow and (being in Italy) > expensive, I would like to use apt to upgrade my system, but being > myself the connection using a Zip disk to carry .deb files from our > debian mirror at the university to home. > > Is there some way to know what is apt going to download, so that I > can go, fetch them and plug them in?
apt-get --no-act upgrade tells you the packages (without version number) that apt-get will download. You will need some glue to combined the package name with the filename, a simple exercise for a perl programmer. Torsten BTW: If you are unexperienced in writing such code I could assist you. Here is some code for slurping in the package files as a start. Next you need to call the above comand and print the filename for each package which is output. use strict; use DirHandle; my $dir = '/var/state/apt/lists'; my %Packages; my $d = new DirHandle $dir or die "Readdir $dir: $!"; my $file; while(defined ($file = $d->read)) { # Skip stable next if $file !~ /unstable/; open IN, "<$dir/$file" or die "Read $dir/$file: $!"; my $package; while(<IN>) { /^Package: (.*)$/ and $package = $1; /^Filename: (.*)$/ and $Packages{$package} = $1; } close IN; } print "$Packages{'3dchess'}\n"; print "$Packages{'gs-aladdin'}\n";