diff options
author | Robert Luberda <robert@debian.org> | 2010-04-15 12:10:21 +0200 |
---|---|---|
committer | Raphaƫl Hertzog <hertzog@debian.org> | 2010-04-15 12:10:21 +0200 |
commit | 29fe363219625f2a411c85ce065ad47a67077797 (patch) | |
tree | cfd597d3bd22c8393e90c22cd379c3f1d306ffba | |
parent | 8ccebf62ea2940b597e2d66433b1ac00801e1c6b (diff) | |
download | dpkg-29fe363219625f2a411c85ce065ad47a67077797.tar.gz |
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.
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | dselect/pkglist.cc | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index 4fa775209..08abe0321 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 fd90dcf26..6bd7db910 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; |