From 35bd4d84cbb70bbe0cfaccdfc1344d7e6a58e373 Mon Sep 17 00:00:00 2001 From: Keith Marshall Date: Mon, 12 Mar 2012 21:07:30 +0000 Subject: [PATCH] Don't report failed downloads in respect of virtual packages. --- ChangeLog | 11 +++++++++++ src/pkginet.cpp | 15 ++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c3826b5..3562cb7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2012-03-12 Keith Marshall + + 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 Don't suppress implied downloads for top-level actions. diff --git a/src/pkginet.cpp b/src/pkginet.cpp index 29bae87..755ad5a 100644 --- a/src/pkginet.cpp +++ b/src/pkginet.cpp @@ -4,7 +4,7 @@ * $Id$ * * Written by Keith Marshall - * 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() ); -- 2.11.0