[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dependencies in Dir w/ Many .deb Files



  aj> You can:
  aj>
  aj> - Copy the files in /var/lib/apt/lists from the office machine as well
  aj> - Use apt-move on the office machine to move the downloaded files into a
  aj>   hierarchy that you can add to your sources.list on your home computer,
  aj>   e.g. using apt-cdrom
  aj> - Read the apt-offline howto

Wow, I didn't know there might be so many solutions!

While waiting for responses to my original post, I came up with yet
another approach:

   o Run Aptitude on my office machine

   o Copy/paste Aptitude's output into a file (say, "aptout")

   o Use that file as input to a simple Perl script (attached below)
     using:

             # ao2dep aptout >aptdeps

   o Transfer all files to home machine including "aptdeps"

   o At home install the new/upgraded files:

             # dpkg -i `cat aptdeps`


Now back to my 'ppp' problems!  When I solve them, I won't need any
of the above ...

Thanks for your comments,

  -Kenneth

#!/usr/bin/perl
#
#  ao2dep: transform Aptitude install/upgrade output
#           into list of files in correct dependency order
#
#    $Id: ao2dep,v 1.1 2004/07/19 12:19:22 root Exp $
#

### Make sure there's a file name on command line ###
if ($#ARGV != 0) {
        print "Usage: ao2dep <filename>\n";
        exit (1);
}

### Generate the correctly ordered file list ###
while(<>) {

    # Select correct lines from entire Aptitude output
    if (/using|from/) {

        # Delete prefix text
	s/.*...\///;

        # Delete suffix text
	s/\).*//;

	# Output the file name
	print;
    }

}

Reply to: