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

Re: Backup Image for my needs



On Thu, Dec 18, 2008 at 10:15:11AM -0800, Rob Starling <debian-user@robstarling.org> was heard to say:
> On Thu, Dec 18, 2008 at 09:11:10AM -0800, Daniel Burrows wrote:
> >   (a) save "aptitude search '~i'" and "aptitude search '~i~A'"
> > 
> >   (b) run "aptitude install -o 'Aptitude::Auto-Install=false'
> >                     $(cat list-of-installed-packages)"
> > 
> >   (c) run "aptitude markauto $(cat list-of-auto-packages)"
> > 
> >   If you exceed the maximum number of command-line arguments, which you
> > probably will, you can either break them up into batches or do some
> > hacks to feed them into the command-line prompt (which means you have to
> > figure out how to force the program to make a prompt).  Of course,
> > breaking the install runs up into batches would mean you have to
> > sort them topologically (the implementation of which is left to the
> > reader familiar with python-apt and Wikipedia).
> 
> fortunately, for (c), that's exactly what xargs is for:
>   cat list-of-auto-packages | xargs aptitude markauto

  True that.

> Carl's point about alternatives is the trickiest part, though.

  By disabling auto-installation in step (a), you avoid that: you should
get only the packages you asked for.  That's also why you need to install
packages in dependency order (and of course install cycles together).
The one problem I can imagine is if some of the packages you want to
install conflict with stuff that's installed by default.

> Another complication is that you can manually install a package
> that is "recommended" by another and then mark it auto and it'll
> stick around.

  Yes, but if you get in that situation at the end of the above set
of steps, it's because you were in that situation in the first place :) --
i.e., the recommended package was installed and marked automatic to
start with.

  Daniel


Reply to: