On Tue, 2001-11-20 at 11:56, Michael A. Miller wrote:
> I'd like to download a selection of packages for machine A that
> is on a slow connection.  So I made a list of what I want and
> went to machine B, which has a fast connection, and used "apt-get
> --download-only install package".  This didn't work for packages
> that are already installed on machine B because apt-get saw them
> as already up-to-date.  
> 
> Can anyone tell me if there is a way to force apt-get (or any
> other tool) to download a package regardless of it's status on
> the machine from which it is being downloaded?  I could do this
> easily with wget if I knew a way to automatically find the url
> for a package, based on my sources.list.  Any ideas on that?

Perhaps you could try this:

export yourpackages="yadda yadda"

apt-get install $yourpackages --print-uris -y --reinstall |tail +5|awk
'{print $1}' >aptfile

wget -i aptfile

I've built this on the fly with some debugging, let me know if you have
problems with it.  I'm having a bit of trouble getting sed to strip off
the single quotes due my inexperience with regexps on the command line
and what needs to be escaped from bash etc.  I've totally confused
myself so I went with the file way, wget seems to understand the single
quotes.

sed -e "s/'\$//"|sed -e "s/'//" Strips them both off, but the last
version of the sed command only strips the first ' off and trying to
combine them isn't working for me with (|) syntax.  Maybe a regexp or
sed guru could give me a pointer.

--mike


Reply via email to