OSDN Git Service

Don't report failed downloads in respect of virtual packages.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Mon, 12 Mar 2012 21:07:30 +0000 (21:07 +0000)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Mon, 12 Mar 2012 21:07:30 +0000 (21:07 +0000)
ChangeLog
src/pkginet.cpp

index c3826b5..3562cb7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-03-12  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Don't report failed downloads in respect of virtual packages.
+
+       * src/pkginet.cpp (pkgActionItem::DownloadArchiveFiles): Clear...
+       [ACTION_DOWNLOAD]: ...this status flag for any package identified as
+       a meta-package; this corrects a further regression introduced with the
+       2011-11-09 update, whereby pending download requests for such virtual
+       packages were not cancelled, resulting in failure to install due to
+       failed downloads, when no download is actually required.
+
 2012-03-05  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Don't suppress implied downloads for top-level actions.
index 29bae87..755ad5a 100644 (file)
@@ -4,7 +4,7 @@
  * $Id$
  *
  * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
- * Copyright (C) 2009, 2010, 2011, MinGW Project
+ * Copyright (C) 2009, 2010, 2011, 2012, MinGW Project
  *
  *
  * Implementation of the package download machinery for mingw-get.
@@ -734,12 +734,17 @@ void pkgActionItem::DownloadArchiveFiles( pkgActionItem *current )
        */
       const char *package_name = current->Selection()->ArchiveName();
 
-      /* An explicit package name of "none" is a special case, indicating
-       * a "virtual" meta-package; it requires nothing to be downloaded...
+      /* An explicit package name of "none" is a special case;
+       * it identifies a "virtual" meta-package...
        */
-      if( match_if_explicit( package_name, value_none ) )
+      if( match_if_explicit( package_name, value_none ) )
        /*
-        * ...but we expect any other package to provide real content,
+        * ...which requires nothing to be downloaded...
+        */
+       current->flags &= ~(ACTION_DOWNLOAD);
+
+      else
+       /* ...but we expect any other package to provide real content,
         * for which we may need to download the package archive...
         */
        current->DownloadSingleArchive( package_name, pkgArchivePath() );