OSDN Git Service

Do not preserve unnecessary download requests.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 11 Dec 2012 12:55:31 +0000 (12:55 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Tue, 11 Dec 2012 12:55:31 +0000 (12:55 +0000)
ChangeLog
src/pkginet.cpp

index 5a2d54b..def75ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-12-11  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Do not preserve unnecessary download requests.
+
+       * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles):
+       [(flags & ACTION_INSTALL) != ACTION_INSTALL]: Actions having no
+       "install" effect do not require a download; cancel any associated
+       download request.
+
 2012-12-10  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Implement GUI bindings for package download agent.
index 65c821f..586fa39 100644 (file)
@@ -771,6 +771,12 @@ void pkgActionItem::DownloadArchiveFiles( pkgActionItem *current )
         */
        current->DownloadSingleArchive( package_name, pkgArchivePath() );
     }
+    else
+      /* The current action has no associated "install" requirement,
+       * so neither is there any need to request a "download".
+       */
+      current->flags &= ~(ACTION_DOWNLOAD);
+
     /* Flush out any diagnostics relating to the current package, then
      * repeat the download action, for any additional packages specified
      * in the current "actions" list.