The following commit has been merged in the master branch:
commit fb8997a460a0ef2909199b4603604a4e855003e0
Author: Guillem Jover <[email protected]>
Date:   Tue Jul 24 18:37:28 2012 +0200

    dpkg: Always reset want status when installing a package
    
    Move pkg_set_want() call from wanttoinstall() to the call site in
    process_archive(), so that the status-want change affects all ‘true’
    return values and not just on “selecting previously unselected package”.
    
    This also makes wanttoinstall() a function that just performs a decision
    without acting on it, matching its name.
    
    Closes: #162541

diff --git a/debian/changelog b/debian/changelog
index d7fd292..9d052aa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -62,6 +62,8 @@ dpkg (1.17.0) UNRELEASED; urgency=low
   * Do not unnecessarily create a dpkg update log record on remove or purge.
   * Always reset want status when removing or purging a package; so this
     now resets holds among others. Closes: #163763
+  * Always reset want status when installing a package; so this now resets
+    holds among others. Closes: #162541
 
  -- Guillem Jover <[email protected]>  Fri, 03 Aug 2012 13:21:00 +0200
 
diff --git a/src/archives.c b/src/archives.c
index b59e10b..a4ebe92 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1696,7 +1696,6 @@ wanttoinstall(struct pkginfo *pkg)
     if (f_alsoselect) {
       printf(_("Selecting previously unselected package %s.\n"),
              pkgbin_name(pkg, &pkg->available, pnaw_nonambig));
-      pkg_set_want(pkg, want_install);
       return true;
     } else {
       printf(_("Skipping unselected package %s.\n"),
diff --git a/src/processarc.c b/src/processarc.c
index 656dd63..e7e3118 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -521,7 +521,9 @@ void process_archive(const char *filename) {
   clear_deconfigure_queue();
   clear_istobes();
 
-  if (!wanttoinstall(pkg)) {
+  if (wanttoinstall(pkg)) {
+    pkg_set_want(pkg, want_install);
+  } else {
       pop_cleanup(ehflag_normaltidy);
       return;
   }

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to