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

Re: aptitude dist-upgrade removes important packages



On Fri, Nov 17, 2006 at 21:48:47 +0100, Marko Randjelovic wrote:
> Florian Kulzer wrote:
> >Most likely it is not a bug. It seems that some packages have been
> >marked as "automatically installed" and no other package on your system
> >depends on them anymore. In that case aptitude will remove these
> >"unused" packages unless you change that configuration option. 
> >
> >This should be fixable by running
> >
> >aptitude unmarkauto '~M!~R~i'
> >
> >to remove the "auto" mark from all the packages on which no other
> >installed package depends
> These packages are marked as auto, but I am not sure if your fix will do 
> what you think

I am pretty certain that the above command does what I think it does: It
will make sure that no packages are erroneously removed because aptitude
thinks they are unused. It will not do any more than that. You are
obviously asking for a massive upgrade (and you did not provide this
important second part of the output in your original message) and
aptitude might have to remove packages because of other problems, e.g.
conflicts, missing dependencies, etc.

> root@main:~# aptitude unmarkauto '~M!~R~i'
> Reading package lists... Done
> Building dependency tree... Done
> Reading extended state information
> Initializing package states... Done
> Writing extended state information... Done
> Reading task descriptions... Done
> Building tag database... Done
> The following packages are unused and will be REMOVED:

[ snip: aptitude wants to remove a lot of gnome-related packages ]

> The following packages have been kept back:

[ snip: many packages: KDE, OOo, postgresql, libs, ... ]

> 0 packages upgraded, 0 newly installed, 43 to remove and 212 not upgraded.
> Need to get 0B of archives. After unpacking 135MB will be freed.
> Do you want to continue? [Y/n/?]
> 
> So even in this command it tries to remove them.

I would run "aptitude keep-all" to cancel all actions and then
investigate the issue. To this end I would first try to ensure that the
system is self-consistent, i.e. aptitude should not want to change
anything if you run "aptitude install -fsD". (This is a safe command
which will simulate what would be done and give some explanations about
reasons for automatic installs or removals.) If aptitude already wants
to remove packages without being asked to (dist-)upgrade then you have
to find the reason for this and eliminate it. The most common cause for
this problem are top-level packages which are mistakenly marked as
"auto".

Once the system is self-consistent you can try the upgrade again. The
difference (if any) between "upgrade" and "dist-upgrade" might help to
find the reason of unwanted removals; the "-D" option can also be
useful. If aptitude keeps acting up with many blocked packages and
automatic removals then you might have one or more of the following
problems:

- incomplete /etc/apt/sources.list
- broken /etc/apt/preferences (e.g. package pins)
- non-Debian packages which have screwy dependencies
- installed backports (in case you are trying to go Sarge -> Etch)
- problems with /root/.aptitude/config

-- 
Regards,
          Florian



Reply to: