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

Bug#548013: apt: Claim optional dependency of required package is a hard dependency



Package:  apt
Version:  0.7.23.1
Severity: normal

I discovered this while tracking down a problem reported by piuparts
(see #539142).  There, apt refuses to remove install-info because it
is seen to be a dependency of the required package util-linux, while
aptitude is OK with removing it, because it is only an optional
dependency and a new enough dpkg is installed.  The version of
util-linux have this depends line:

  Depends: [...], dpkg (>= 1.15.4) | install-info

In the chroot, version 1.15.4 of dpkg is installed.

Here is a test run.  Note how apt-get refuses to remove install-info,
while aptitude happily remove it.


# debootstrap sid chroot-directory http://ftp.se.debian.org/debian ; chroot chroot-directory apt-get remove -y install-info; chroot chroot-directory aptitude remove -y install-info
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
[...]
I: Configuring apt-utils...
I: Configuring aptitude...
I: Configuring tasksel-data...
I: Configuring tasksel...
I: Base system installed successfully.
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  info install-info
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 util-linux)
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 659kB disk space will be freed.
E: There are problems and -y was used without --force-yes
Reading package lists... Done
Building dependency tree... Done
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
The following packages are BROKEN:
  info
The following packages will be REMOVED:
  install-info
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 258kB will be freed.
The following packages have unmet dependencies:
  info: Depends: install-info but it is not installable
The following actions will resolve these dependencies:

Remove the following packages:
info

Score is 115

Writing extended state information... Done
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 10023 files and directories currently installed.)
Removing info ...
Removing install-info ...
Processing triggers for man-db ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done

#

Happy hacking,
-- 
Petter Reinholdtsen



Reply to: