Re: Offline aptitude?
On Mon, Aug 11, 2003 at 02:51:20PM -0500, Alex Malinovich wrote:
>
> On Fri, 2003-08-08 at 13:29, Michael Milligan wrote:
> > 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)
> > 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.
> After that, I'd suggest looking more closely at dpkg instead of
> aptitude.
This is how I wound up accomplishing this. Specifically, apt.conf can
be massaged to cause aptitude to produce a log containing entries of
the general form
[ACTION] package version stuff
and to place the downloaded packages in a handy user-writable
directory without attempting to actually install them. These packages
and the log were transported to the offline site, and sed used to
convert the log into a file of "package deinstall" records for
consumption by
dpkg --set-selections
after which dpkg --force-depends -r -a removed the unwanted packages,
dpkg -R -i pkg_dir/ begins installing the replacements, and a few
rounds of dpkg -c -a and dpkg -i <files> take care of installation
ordering issues that would normally be APT's problem.
I'd still be interested in finding a way of further automating some of
this; e.g. getting aptitude to read back the actions in its log file,
or to write out a pkgstates snapshot on demand. The existence of the
-S option to aptitude suggests that this might be possible, but the
documentation never mentions how.
Thanks,
...Michael
--
Key fingerprint = 9F6B E8F5 206F 35E9 FABB 9EAD 398D CD42 D1CE 8C87
See my homepage for PGP/GPG public key: http://home.uchicago.edu/~mbmillig/
Reply to: