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

Re: APT: how to dwnld already debs...



Quoting churasco (churasco@penguinpowered.com):
> howdie, this must be a simple faq... but haven't found it in any documentation:
> 
> How to do you ask apt-get to download all the .deb files necessary for a
> given package, if that package is already installed on your machine? I've
> tried "apt-get -d install SOME-PACKAGE" but it works only for those
> packages which are not yet installed on my machine. For those packages that
> are already installed, it just tells me they are installed...
> 
> Here is the more detailed scenario: I have two machines, an officeMachine
> and a homeMachine. officeMachine is connected to the net and has debian
> installed. homeMachine is not connected to the net (and has no cd-rom), and
> has no debian (yet). The two machines share files through zip disks. The
> goal is thus to dwnld packages (X11, gnome, etc.)  with officeMachine, put
> them on a zip, and install at home.
> 
> Short of making a mini-mirror of ftp.debian.org on my hd/zip, it has been a
> no-go for the moment...

The way I find easiest is to start by editing the file
/usr/lib/dpkg/methods/apt and changing "apt-clean" to
"true". You can do this on VC2 as root as early in the
installation procedure as possible, but in any case
before the "package selection" stage.

Then, after dselect has finished its downloading and
during the unpacking stage (I always just accept the
defaults), I copy /var/cache/apt/archives/*deb to
wherever. I keep them in batches in separate directories
so they're easy to dpkg -i *deb on other machines,
though I have a python script to recreate a distribution
tree using a Packages file.

Of course, you need to clean the cache yourself between
each batch of debs. You might not like this method...

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.


Reply to: