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

Re: Backup Image for my needs



On Thu, Dec 18, 2008 at 09:11:10AM -0800, Daniel Burrows wrote:
> On Wed, Dec 17, 2008 at 08:51:12PM -0800, Carl Johnson <carlj@peak.org> was heard to say:
> > Just because a package is automatically installed doesn't mean that it
> > is the choice the package manager would choose.  For example many
> > packages depend on www-browser, but which one is automatically
> > installed?  You can use aptitude to select the one you want and then
> > remove any other automatically installed one, but how will it know
> > that if you install from that list later?
> 
>   What should work, probably, is (this is an outline and not a complete
> list of commands):
> 
>   (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

as for (b), the reader has an all-nighter in the CS lab ahead
of them ;)

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

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.

--Rob

-- 
/-------------------------------------------------------------\
| "If we couldn't laugh we would all go insane"               |
|              --Jimmy Buffett,                               |
|                "Changes in Latitudes, Changes in Attitudes" |
\-------------------------------------------------------------/


Reply to: