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

Bug#601961: apt: wrongly thinks install-info is essential



On Wed, Nov 17, 2010 at 22:31, Carsten Hey <carsten@debian.org> wrote:
> * Lucas Nussbaum [2010-10-31 15:24 +0100]:
>> On 31/10/10 at 14:16 +0100, David Kalnischkies wrote:
>> > On Sun, Oct 31, 2010 at 12:40, Lucas Nussbaum <lucas@lucas-nussbaum.net> wrote:
>> > > apt won't let me remove install-info, because it thinks that it is
>> > > essential.
>> > >
>> > > grep depends on dpkg (>= 1.15.4) | install-info
>> > > my dpkg is 1.15.8.5
>> > > so I should be allowed to remove install-info without that:
>> > >
>> > > WARNING: The following essential packages will be removed.
>> > > This should NOT be done unless you know exactly what you are doing!
>> > >  install-info (due to grep)
>> >
>> > APT uses "essential" here not in the "Essential: yes" sense but
>> > in the essential tools and packages sense. APT considers all
>> > packages priority "important" or higher as essential for a system
>> > And prints this "AnalPrompt" (as the sourcecode puts it) to prevent
>> > the user from doing something stupid as it is unlikely that the "normal"
>> > user really wants to remove an important package - and all others tend
>> > to know exactly what they are doing…
>
> I was able to remove aptitude using apt 0.8.8, so this does not seem to
> be correct.  Even if it would be correct, this would imho be an awful
> feature and more or less equivalent to removing the Essential field.

Sorry, I confused that. The listparsers seems to support beside an
"Essential: yes" also an "Important: yes" marker - I have not enough
background to know if this was ever an official feature or something like
the Obsoletes features which never made it into the archive…

So what I said is apparently wrong - but I would find it useful:
I don't consider it a good idea to remove important packages without
a special warning. It feels strange to be able to remove e.g. apt, aptitude,
debconf, gpgv and the other 61 important packages (+ ~39 non-essential
required packages) without a warning that this is properly a bad thing…

Note: apt warns about removing itself, as it marks itself with Important: yes…

> Apt won't let me remove install-info too, maybe alternative dependencies
> are not handled correctly in this case, or at least alternative
> dependencies if one of the alternatives is "Essential: yes"?

Second true & sorry. As said, thats an or-group problem.
install-info is "pseudo" pseudo-essential through e.g. findutils
Depends: dpkg (>= 1.15.4) | install-info
and as the loop responsible for printing the due line which shows
which dependencies of essential packages are going to remove
doesn't take or-groups into account we are here.

I initial thought that needs some full-blown check with or-groups and
provides, but it seems to be much simpler:
If a pseudo-essential is removed her rev-depends essential is properly
also in the list of removals - if not another or-group member or another
provider has taken over and we can ignore it…
Attached is a two-line patch working with this theory - if nothing
ends up being broken it should be one of the first things for wheezy.


Best regards

David Kalnischkies

Attachment: apt-bug-601961-install-info
Description: Binary data


Reply to: