error message for unmet dependencies is misleading

Bug #1752448 reported by Christophe Malek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
New
Undecided
Unassigned

Bug Description

When trying to install some older packages on a machine with newer packages I get the following message:

The following packages have unmet dependencies:
 libcupsimage2 : Depends: libcups2 (= 1.7.2-0ubuntu1.8) but 1.7.2-0ubuntu1.9 is to be installed
 libgfortran3 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04.3) but 4.8.4-2ubuntu1~14.04.4 is to be installed
E: Unable to correct problems, you have held broken packages.

The way the message is worded makes it seem like I was trying to install version 1.7.2-0ubuntu1.9 and 4.8.4-2ubuntu1~14.04.4 of the above packages.

In reality, these were the versions of the packages that were already installed on the machine.

This caused a fair bit of confusion when trying to debug the situation.

If you could please reword the error message to be correct. Perhaps something along the lines of:

The following packages have unmet dependencies:
 libcupsimage2 : Depends: libcups2 (= 1.7.2-0ubuntu1.8) but 1.7.2-0ubuntu1.9 is already installed
 libgfortran3 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04.3) but 4.8.4-2ubuntu1~14.04.4 is already installed
E: Unable to correct problems, you have held broken packages.

Thanks!

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apt 1.2.25
ProcVersionSignature: Ubuntu 4.13.0-36.40~16.04.1-generic 4.13.13
Uname: Linux 4.13.0-36-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Feb 28 18:14:25 2018
InstallationDate: Installed on 2017-11-03 (117 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Christophe Malek (jcmalek) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

I'm not sure if we can improve that. The current message is somewhat correct, changing it to "already installed" would be sort of wrong - whether it's installed or not does not matter. What's mattering is that these versions are supposed to remain installed, sort of.

Revision history for this message
Christophe Malek (jcmalek) wrote :

Feel free to word the new message in whatever way you feel is more correct. The current message is definitely incorrect.

Your suggestion is fine with me:
libcupsimage2 : Depends: libcups2 (= 1.7.2-0ubuntu1.8) but 1.7.2-0ubuntu1.9 will remain installed.

Whether it is installed or not matters a lot to someone trying to understand why they are getting an error message. As a package management utility I'm sure apt should be able to detect what is installed and give an appropriate message for either case.

If you think adding additional detection would overcomplicate the code then a more inclusive message could work too but is a little harder to read:
libcupsimage2 : Depends: libcups2 (= 1.7.2-0ubuntu1.8) but 1.7.2-0ubuntu1.9 is to be or will remain installed.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.