The following commit has been merged in the master branch:
commit 29fe363219625f2a411c85ce065ad47a67077797
Author: Robert Luberda <[email protected]>
Date: Thu Apr 15 12:10:21 2010 +0200
dselect: treat unknown packages as known and marked for purge
This is a temporary work-around so that dselect doesn't try to
reinstall packages of priority > standard that were removed or not
installed.
The complete solution (tracked in #551638) will involve storing the
seen/not-seen information somewhere else than in the dpkg status database
and ideally in a new database shared by all frontends.
diff --git a/debian/changelog b/debian/changelog
index 4fa7752..08abe03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,10 @@ dpkg (1.15.6.2) UNRELEASED; urgency=low
should now start using dpkg-buildflags instead. Closes: #560070
* For Ubuntu set default value of LDFLAGS to -Wl,-Bsymbolic-functions.
* Cleanup some old Conflicts/Replaces, thanks to Helge Kreutzmann.
+ * Modify dselect to treat all unknown package as known and marked for purge.
+ This is a temporary work-around so that dselect doesn't try to reinstall
+ packages of priority > standard that were removed or not installed. Thanks
+ to Robert Luderda for the patch. Closes: #559519, #556889
[ Colin Watson ]
* Modern tar files typically use NormalFile1 rather than NormalFile0 for
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc
index fd90dcf..6bd7db9 100644
--- a/dselect/pkglist.cc
+++ b/dselect/pkglist.cc
@@ -398,15 +398,16 @@ packagelist::packagelist(keybindings *kb) : baselist(kb) {
pkg->clientdata= 0; continue;
}
if (!pkg->available.valid) blankpackageperfile(&pkg->available);
- state->direct= state->original= pkg->want;
- if (readwrite && pkg->want == pkginfo::want_unknown) {
+ // treat all unknown packages as already seen
+ state->direct= state->original= (pkg->want == pkginfo::want_unknown ?
pkginfo::want_purge : pkg->want);
+ if (readwrite && state->original == pkginfo::want_unknown) {
state->suggested=
pkg->status == pkginfo::stat_installed ||
pkg->priority <= pkginfo::pri_standard /* FIXME: configurable */
? pkginfo::want_install : pkginfo::want_purge;
state->spriority= sp_inherit;
} else {
- state->suggested= pkg->want;
+ state->suggested= state->original;
state->spriority= sp_fixed;
}
state->dpriority= dp_must;
@@ -455,7 +456,8 @@ void perpackagestate::free(int recursive) {
pkg->clientdata= uprec;
} else {
assert(!recursive);
- if (pkg->want != selected) {
+ if (pkg->want != selected &&
+ !(pkg->want == pkginfo::want_unknown && selected ==
pkginfo::want_purge)) {
pkg->want= selected;
}
pkg->clientdata= 0;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]