Debian Bug report logs - #486748
aptitude: dependency resolver avoids warning when removing essential packages

version graph

Package: aptitude; Maintainer for aptitude is Aptitude Development Team <aptitude-devel@lists.alioth.debian.org>; Source for aptitude is src:aptitude.

Reported by: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>

Date: Tue, 17 Jun 2008 23:12:01 UTC

Severity: normal

Found in version aptitude/0.4.11.4-1

Fixed in version 0.4.11.5-1

Done: Daniel Burrows <dburrows@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Daniel Burrows <dburrows@debian.org>:
Bug#486748; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
New Bug report received and forwarded. Copy sent to Daniel Burrows <dburrows@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: aptitude: dependency resolver avoids warning when removing essential packages
Date: Tue, 17 Jun 2008 23:08:33 +0000
[Message part 1 (text/plain, inline)]
Package: aptitude
Version: 0.4.11.4-1
Severity: normal

When I tried to upgrade my system today, the new ncurses-base depends on
a newer version of libncurses5 than is in unstable (on amd64).  As a
consequence, the dependency resolver offers to keep ncurses-base at its
current version.  The next option is to remove ncurses-base; however,
ncurses-base is an essential package.  If I select this resolution,
aptitude seems quite happy to remove ncurses-base.  (I did stop it
before it actually attempted to invoke dpkg.)

In no event should aptitude remove an essential package without getting
the user's consent.  (As a side issue, it probably shouldn't suggest
removing an essential package, either, but I don't care that much.)

-- Package-specific info:
aptitude 0.4.11.4 compiled at Jun  8 2008 01:39:27
Compiler: g++ 4.3.1 20080523 (prerelease)
Compiled against:
  apt version 4.6.0
  NCurses version 5.6
  libsigc++ version: 2.0.18
  Ept support enabled.

Current library versions:
  NCurses version: ncurses 5.6.20080531
  cwidget version: 0.5.11
  Apt version: 4.6.0
	linux-vdso.so.1 =>  (0x00007fff5b7ff000)
	libapt-pkg-libc6.7-6.so.4.6 => /usr/lib/libapt-pkg-libc6.7-6.so.4.6 (0x00007ff353303000)
	libncursesw.so.5 => /lib/libncursesw.so.5 (0x00007ff3530ba000)
	libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0x00007ff352eb5000)
	libcwidget.so.3 => /usr/lib/libcwidget.so.3 (0x00007ff352bba000)
	libept.so.0 => /usr/lib/libept.so.0 (0x00007ff352942000)
	libxapian.so.15 => /usr/lib/libxapian.so.15 (0x00007ff3525ba000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007ff3523a3000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x00007ff352187000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ff351e7b000)
	libm.so.6 => /lib/libm.so.6 (0x00007ff351bf8000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007ff3519e1000)
	libc.so.6 => /lib/libc.so.6 (0x00007ff35168d000)
	libutil.so.1 => /lib/libutil.so.1 (0x00007ff35148a000)
	libdl.so.2 => /lib/libdl.so.2 (0x00007ff351286000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ff3535d2000)
Terminal: gnome-256color
$DISPLAY is set.
`which aptitude`: /usr/bin/aptitude
aptitude version information:

aptitude linkage:

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-rc5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aptitude depends on:
ii  apt [libapt-pkg-libc6. 0.7.14            Advanced front-end for dpkg
ii  libc6                  2.7-12            GNU C Library: Shared libraries
ii  libcwidget3            0.5.11-1          high-level terminal interface libr
ii  libept0                0.5.18            High-level library for managing De
ii  libgcc1                1:4.3.1-2         GCC support library
ii  libncursesw5           5.6+20080531-1    Shared libraries for terminal hand
ii  libsigc++-2.0-0c2a     2.0.18-2          type-safe Signal Framework for C++
ii  libstdc++6             4.3.1-2           The GNU Standard C++ Library v3
ii  libxapian15            1.0.5-1           Search engine library
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages aptitude recommends:
pn  aptitude-doc-en | aptitude-do <none>     (no description available)
ii  libparse-debianchangelog-perl 1.1.1-2    parse Debian changelogs and output

-- no debconf information

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#486748; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to Daniel Burrows <dburrows@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #10 received at 486748@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>, 486748@bugs.debian.org
Subject: Re: Bug#486748: aptitude: dependency resolver avoids warning when removing essential packages
Date: Tue, 17 Jun 2008 20:11:10 -0700
On Tue, Jun 17, 2008 at 11:08:33PM +0000, "brian m. carlson" <sandals@crustytoothpaste.ath.cx> was heard to say:
> When I tried to upgrade my system today, the new ncurses-base depends on
> a newer version of libncurses5 than is in unstable (on amd64).  As a
> consequence, the dependency resolver offers to keep ncurses-base at its
> current version.  The next option is to remove ncurses-base; however,
> ncurses-base is an essential package.  If I select this resolution,
> aptitude seems quite happy to remove ncurses-base.  (I did stop it
> before it actually attempted to invoke dpkg.)

  I can't reproduce this on my computer.  Do you have an example of
aptitude removing an essential package without prompting?  It should do
something like this:

---- snip here ----
daniel@alpaca:~$ aptitude -s remove debian-archive-keyring
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information       
Initializing package states... Done
The following packages are BROKEN:
  apt  cdebootstrap  
The following packages will be REMOVED:
  debian-archive-keyring  
0 packages upgraded, 0 newly installed, 1 to remove and 49 not upgraded.
Need to get 0B of archives. After unpacking 57.3kB will be freed.
The following packages have unmet dependencies:
  apt: Depends: debian-archive-keyring but it is not installable
  cdebootstrap: Depends: debian-archive-keyring but it is not installable
The following actions will resolve these dependencies:

Remove the following packages:
apt
apt-file
apt-listchanges
apt-transport-https
apt-utils
aptitude
aptitude-dbg
cdebootstrap
debian-el
debtags
dpkg-dev-el
libapt-pkg-dev
libapt-pkg-perl
libept-dev
libept0
python-apt
reportbug
synaptic

Install the following packages:
debootstrap [1.0.9 (unstable)]

Leave the following dependencies unresolved:
debconf recommends apt-utils (>= 0.5.1)
deborphan recommends apt
installation-report recommends reportbug
libeel2-2.20 recommends synaptic
lsb-release recommends apt
Score is -2251

Accept this solution? [Y/n/q/?] 
The following NEW packages will be installed:
  debootstrap{a} (for pbuilder)  
The following packages will be REMOVED:
  apt{a}  apt-file{a}  apt-listchanges{a}  apt-transport-https{a}  
  apt-utils{a}  aptitude{a}  aptitude-dbg{a}  aptitude-doc-cs{u}  
  aptitude-doc-fi{u}  cdebootstrap{a}  debian-archive-keyring  
  debian-el{a}  debtags{a}  dlocate{u}  dpkg-dev-el{a}  
  libapt-pkg-dev{a}  libapt-pkg-perl{a}  libconfig-file-perl{u}  
  libept-dev{a}  libept0{a}  liblist-moreutils-perl{u}  
  libtagcoll2-dev{u}  libwibble-dev{u}  locate{u}  python-apt{a}  
  reportbug{a}  synaptic{a}  
0 packages upgraded, 1 newly installed, 27 to remove and 46 not upgraded.
Need to get 51.8kB of archives. After unpacking 70.9MB will be freed.
Do you want to continue? [Y/n/?] y
The following ESSENTIAL packages will be REMOVED!
  apt 

WARNING: Performing this action will probably cause your system to break!
         Do NOT continue unless you know EXACTLY what you are doing!
To continue, type the phrase "I am aware that this is a very bad idea":
---- snip here ----

> In no event should aptitude remove an essential package without getting
> the user's consent.  (As a side issue, it probably shouldn't suggest
> removing an essential package, either, but I don't care that much.)

  It's fairly easy to avoid suggesting essential packages: instead of
giving those solutions such a huge penalty that the solutions come up
last, change the relevant line of code to hard-exclude them.  That might
be a good idea anyway: I'm not sure why things are the way they are, but
my best guess is that the code to discourage aptitude from removing
essential packages predates the existence of hard exclusions.

  Daniel




Information forwarded to debian-bugs-dist@lists.debian.org, Daniel Burrows <dburrows@debian.org>:
Bug#486748; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Extra info received and forwarded to list. Copy sent to Daniel Burrows <dburrows@debian.org>. Full text and rfc822 format available.

Message #15 received at 486748@bugs.debian.org (full text, mbox):

From: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>
To: Daniel Burrows <dburrows@debian.org>
Cc: 486748@bugs.debian.org
Subject: Re: Bug#486748: aptitude: dependency resolver avoids warning when removing essential packages
Date: Wed, 18 Jun 2008 04:16:54 +0000
[Message part 1 (text/plain, inline)]
On Tue, Jun 17, 2008 at 08:11:10PM -0700, Daniel Burrows wrote:
>On Tue, Jun 17, 2008 at 11:08:33PM +0000, "brian m. carlson" <sandals@crustytoothpaste.ath.cx> was heard to say:
>> When I tried to upgrade my system today, the new ncurses-base depends on
>> a newer version of libncurses5 than is in unstable (on amd64).  As a
>> consequence, the dependency resolver offers to keep ncurses-base at its
>> current version.  The next option is to remove ncurses-base; however,
>> ncurses-base is an essential package.  If I select this resolution,
>> aptitude seems quite happy to remove ncurses-base.  (I did stop it
>> before it actually attempted to invoke dpkg.)
>
>  I can't reproduce this on my computer.  Do you have an example of
>aptitude removing an essential package without prompting?  It should do
>something like this:

I used the GUI interface, and the bug exhibited itself as part of an
upgrade.  When I type ! to accept the solution of removing ncurses-bin,
no warning window pops up, and if I hit g twice, it will proceed to
start downloading.  I didn't actually wait to see if it further prompted
me.

Your example exhibits the same behavior when using the GUI.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#486748; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to Daniel Burrows <dburrows@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #20 received at 486748@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>, 486748@bugs.debian.org
Subject: Re: Bug#486748: aptitude: dependency resolver avoids warning when removing essential packages
Date: Tue, 17 Jun 2008 22:02:10 -0700
On Wed, Jun 18, 2008 at 04:16:54AM +0000, "brian m. carlson" <sandals@crustytoothpaste.ath.cx> was heard to say:
> I used the GUI interface, and the bug exhibited itself as part of an
> upgrade.  When I type ! to accept the solution of removing ncurses-bin,
> no warning window pops up, and if I hit g twice, it will proceed to
> start downloading.  I didn't actually wait to see if it further prompted
> me.
>
> Your example exhibits the same behavior when using the GUI.

  Hm, that's kind of astonishing.  It does the same thing in etch too.
I'm not sure how this escaped notice for three years, but probably it
should be fixed, since I'm sure now that you've seen it it'll start
happening to lots of other people too. :-P

  Daniel




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#486748; Package aptitude. Full text and rfc822 format available.

Acknowledgement sent to Daniel Burrows <dburrows@debian.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #25 received at 486748@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: "brian m. carlson" <sandals@crustytoothpaste.ath.cx>, 486748@bugs.debian.org
Subject: Re: Bug#486748: aptitude: dependency resolver avoids warning when removing essential packages
Date: Tue, 17 Jun 2008 22:31:19 -0700
  So, this is interesting.  In addition to the original bug report, it
appears that even the somewhat weak attempt aptitude currently makes to
exclude the removal of Essential packages doesn't trip for apt itself.
There's a separate flag from Essential, Flag::Important, that is
apparently set on apt and only on apt; it's sort of like Essential, but
not exactly the same.  aptitude is a little confused about how to handle
this internally, and probably no-one has ever noticed because it only
matters for apt and removing apt would be perverse.  It does prompt at
the command-line and in curses mode, but the logic to avoid removing
essential packages doesn't apply to apt.

  Anyway, I can try to straighten that out while I'm working on this
problem.

  Daniel




Reply sent to Daniel Burrows <dburrows@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "brian m. carlson" <sandals@crustytoothpaste.ath.cx>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #30 received at 486748-done@bugs.debian.org (full text, mbox):

From: Daniel Burrows <dburrows@debian.org>
To: Christian Perrier <bubulle@debian.org>
Cc: 486748-done@bugs.debian.org, 486858-done@bugs.debian.org, 486934-done@bugs.debian.org
Subject: Re: Accepted aptitude 0.4.11.6-1 (source all i386)
Date: Sun, 22 Jun 2008 20:24:40 -0700
Version: 0.4.11.5-1

On Sun, Jun 22, 2008 at 09:09:38AM +0200, Christian Perrier <bubulle@debian.org> was heard to say:
> Quoting Daniel Burrows (dburrows@debian.org):
> 
> 
> >  aptitude (0.4.11.6-1) unstable; urgency=low
> >  .
> >    * New upstream release.
> 
> 
> Hmm, Daniel, any reasons to not fix the pending l10n bugs in that
> release?
> 
> (I guess you have such reason, of course, no pun intended)

  No, I meant to build with -v0.4.11.5-1 and forgot.  I'll close them
now.

  Daniel




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Fri, 01 Aug 2008 07:35:26 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Apr 17 06:46:24 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.