Bug 2473 - "dpkg -P" confusing error message when removing package with deps
Summary: "dpkg -P" confusing error message when removing package with deps
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-30 19:44 UTC by Adam Roberts
Modified: 2010-08-30 19:47 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments
Fixes confusing error message (16.81 KB, application/octet-stream)
2010-08-30 19:44 UTC, Adam Roberts
Details
Fixes confusing error message (2.13 KB, patch)
2010-08-30 19:47 UTC, Adam Roberts
Details

Note You need to log in before you can comment on or make changes to this bug.
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.