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

Re: Offline aptitude?



On Fri, 2003-08-08 at 13:29, Michael Milligan wrote:
> Maintaining as I do a number of machines with poor connectivity to the
> internet, I make heavy use of the technique described in the "APT
> Offline Usage Guide" to upgrade packages on these systems.
> 
> However, I now find that I need something even more powerful: offline
> aptitude!  The situation is, a couple of machines need to be somewhat
> repurposed, and the best way to get the exact package scheme I want
> (including a lot of selective upgrades and manual conflict resolution)
> that I have so far found is to use aptitude.  If I can get it to work
> in a similar "offline" mode, that is.
> 
> So far, I have convinced the thing to use the same fake apt-tree that
> offline APT uses, which means that it works just fine for downloading
> the needed packages.  I also got it to write out a log of actions
> taken, so technically I have all the information I need to perform the
> upgrades.
> 
> What would be really wonderful, though, would be to convince aptitude
> to save the selections I made into a file, which I could then feed
> into aptitude on the offline end (along with the downloaded packages)
> to perform the actions automatically.  Otherwise I'm going to spend a
> lot of time manually removing deselected packages in between
> installations and upgrades.
> 
> Does anyone know of a way to accomplish this?  Bonus points if I can
> both download the packages, *and* save the selections, without doing
> the selection work twice.

Well, for starters you can tell your mailer to wrap long lines
automatically at about 80 columns or so. :)

After that, I'd suggest looking more closely at dpkg instead of
aptitude. aptitude is more of a front end, while dpkg and apt-get are
the real workhorses. What you'd want to do is something along the lines
of:

dpkg --get-selections

and

dpkg --set-selections

Combine that with apt-get --download-only and you should have what you
need. Look at the man pages for dpkg and apt-get for more details. It
might be possible to have aptitude do all of this from the command line
as well, but since it would just end up calling dpkg and apt-get anyway,
you may as well cut out the middle man.

-- 
Alex Malinovich
Support Free Software, delete your Windows partition TODAY!
Encrypted mail preferred. You can get my public key from any of the
pgp.net keyservers. Key ID: A6D24837

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: