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

Re: keeps servers consistant (debs)



On Thu, Nov 09, 2006 at 10:42:29 +0200, Ratiu Petru wrote:
> 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.

Which step made aptitude want to remove the packages? I would expect
that the "unmarkauto" one should be safe because it marks every
installed package as being manually installed. The "markauto" could be
tricky if you do not yet have all the "top-level" packages installed on
the target machine or if there is a difference between the two computers
regarding the treatment of "recommends".

In any case it should be possible to keep aptitude from removing stuff
by using one of these options:

--schedule-only
-o aptitude::Keep-Unused-Pattern='~T'

-- 
Regards,
          Florian



Reply to: