Bug 2473

Summary: "dpkg -P" confusing error message when removing package with deps
Product: Busybox Reporter: Adam Roberts <adam.g.roberts>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:
Attachments: Fixes confusing error message
Fixes confusing error message

Description Adam Roberts 2010-08-30 19:44:04 UTC
Created attachment 2401 [details]
Fixes confusing error message

Running "dpkg -P <package-name>" for a package which has dependencies installed on the system creates a message similar to the following:

dpkg: package <dependency> depends on <package-name>, which is not installed or flagged to be installed

This is highly misleading to the user because the package <package-name> IS installed on the system, and in fact is the very package the user was looking to remove.

I have modified dpkg.c within version 1.18.0.git slightly to produce output similar, but not identical, to upstream dpkg output in the same situation.  The variance is that while upstream dpkg lists all of the dependencies of <package-name>, this edit to busybox's dpkg will only output what would be the top of upstream dpkg's list. The new output appears as follows:

dpkg: dependency problems prevent the removal of <package-name>
 <dependency> depends on <package-name>

I feel as though this is a far clearer explanation of the situation at hand and is less apt to confuse the user.
Comment 1 Adam Roberts 2010-08-30 19:47:44 UTC
Created attachment 2407 [details]
Fixes confusing error message

Actual patch.