OSDN Git Service

Fix enumeration of pending install actions for scheduled upgrades.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 8 Jan 2013 16:34:53 +0000 (16:34 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 8 Jan 2013 16:34:53 +0000 (16:34 +0000)
ChangeLog
src/pkgdata.cpp

index f52d85f..350c398 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2013-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
+       Fix enumeration of pending install actions for scheduled upgrades.
+
+       * src/pkgdata.cpp (pkgActionItem::EnumeratePendingActions):
+       [action == ACTION_UPGRADE && classified == ACTION_INSTALL]: Enumerate
+       upgrade as a special case of the install classification.
+
+2013-01-08  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
        Implement "Mark All Upgrades" GUI capability.
 
        * src/guimain.h (IDM_REPO_APPLY): Renumbered; make room for...
index c8c58a8..99942f0 100644 (file)
@@ -4,7 +4,7 @@
  * $Id$
  *
  * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2012, MinGW.org Project
+ * Copyright (C) 2012, 2013, MinGW.org Project
  *
  *
  * Implementation of the classes and methods required to support the
@@ -1265,9 +1265,11 @@ unsigned long pkgActionItem::EnumeratePendingActions( int classified )
       int action;
       if( (action = item->flags & ACTION_MASK) != 0 )
       {
-       /* ...and, when one is found...
+       /* ...and, when one is found, (noting that ACTION_UPGRADE may
+        * also be considered as a special case of ACTION_INSTALL)...
         */
-       if( action == classified )
+       if(  (action == classified)
+       ||  ((action == ACTION_UPGRADE) && (classified == ACTION_INSTALL))  )
        {
          /* ...and it matches the classification in which
           * we are interested, then we retrieve the tarname