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

Re: keeps servers consistant (debs)



On Thu, 09 Nov 2006, Florian Kulzer wrote:

> On Thu, Nov 09, 2006 at 04:16:56 +0200, Ratiu Petru wrote:
> > Is there a way to do this in such a way to preserve aptitude's database,
> > too? I'm talking primarily about the auto/noauto status of packages.
> 
> This will give you a list of all automatically installed packages:
> 
> aptitude -F %p search '~M' > automatic.txt
> 
You're right, it's not so straight-forward, but it should work. I kinda
expected something like aptitude --dump-database, I guess.

> Then it should be possible to do this on the new system:
> 
> aptitude unmarkauto '~i'
> aptitude markauto $(cat automatic.txt)
> 
> Disclaimer: I have never actually tried the second part myself.
>
I have done something similar, however I never managed to do the first step
non-interactively (meaning, without aptitude actualy trying to remove all
but Essential packages). I haven't tried really hard, I admit, but it would
be swell if I could do multiple operations at the same time, so that
aptitude would jump directly to the final state, without trying to adapt to
the intermediary step.

Besides the manpage and the guide from aptitude-doc, are there any other
aptitude references? I found surprisingly little documentation on it.

> It might be possible to just copy /var/lib/aptitude/pkgstates to the new
> box if you are absolutely sure that you installed the exact same
> packages. 

I would try to avoid that as much as possible, and keep that database in an
easily versionable, package-version independent, architecture independent
text file. I'm sure everyone sees the benefits.



Reply to: