This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=a81422607ad9bf26449fd90b0c57b42f3c34e5f3 commit a81422607ad9bf26449fd90b0c57b42f3c34e5f3 Author: Guillem Jover <[email protected]> AuthorDate: Tue Apr 23 00:42:20 2019 +0200 dpkg: Do not clear selections for unknown packages We should not clear the selections for packages that are not already installed in the system, as they will end up disappearing on the next operation anyway. Closes: #927752 --- debian/changelog | 1 + src/select.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3e6612de0..6690b4154 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium * buildtools.mk: Add support for nostrip in DEB_BUILD_OPTIONS when setting the STRIP variable. * dpkg-genbuildinfo: Do not include irrelevant packages in the Binary field. + * dpkg: Do not clear selections for unknown packages. Closes: #927752 * Documentation: - man: Fix uncommon wording constructs. * Build system: diff --git a/src/select.c b/src/select.c index a49d6c33b..5c8b16814 100644 --- a/src/select.c +++ b/src/select.c @@ -228,7 +228,7 @@ clearselections(const char *const *argv) iter = pkg_hash_iter_new(); while ((pkg = pkg_hash_iter_next_pkg(iter))) { - if (!pkg->installed.essential) + if (!pkg->installed.essential && pkg->want != PKG_WANT_UNKNOWN) pkg_set_want(pkg, PKG_WANT_DEINSTALL); } pkg_hash_iter_free(iter); -- Dpkg.Org's dpkg

