From: Keith Marshall Date: Sun, 15 Apr 2012 20:22:36 +0000 (+0000) Subject: Ensure that package removal requests are correctly scheduled. X-Git-Tag: r0-6-0-beta-20130904-1~82 X-Git-Url: http://git.osdn.net/view?p=mingw%2Fmingw-get.git;a=commitdiff_plain;h=9a87b4c428985c359888425916b8b217684ef8ff Ensure that package removal requests are correctly scheduled. --- diff --git a/ChangeLog b/ChangeLog index 3353d3a..9bcb471 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2012-04-15 Keith Marshall + Ensure that package removal requests are correctly scheduled. + + * src/pkgdeps.cpp (pkgXmlDocument::Schedule) [ACTION_REMOVE]: Schedule + as a distinct case, when the installed version is not the most recent + available release; consideration of this distinct case was previously + erroneously overlooked. + +2012-04-15 Keith Marshall + Correct scheduling of new prerequisites when upgrading. * src/pkgdeps.cpp (pkgXmlDocument::ResolveDependencies): diff --git a/src/pkgdeps.cpp b/src/pkgdeps.cpp index 49080df..45359c2 100644 --- a/src/pkgdeps.cpp +++ b/src/pkgdeps.cpp @@ -1028,9 +1028,19 @@ void pkgXmlDocument::Schedule( unsigned long action, const char* name ) ResolveDependencies( upgrade, Schedule( with_download( action ), latest ) ); - else + + else if( (action & ACTION_MASK) == ACTION_REMOVE ) { - /* ...but, we decline to proceed with ACTION_INSTALL + /* ...while for ACTION_REMOVE, we have little to do, + * beyond scheduling the removal; (we don't extend the + * scope of a remove request to prerequisite packages, + * so there is no need to resolve dependencies)... + */ + latest.SelectPackage( installed ); + Schedule( action, latest ); + } + else + { /* ...but, we decline to proceed with ACTION_INSTALL * unless the --reinstall option is enabled... */ if( pkgOptions()->Test( OPTION_REINSTALL ) )