Here's a patch on top of that that implements your suggestion. This is untested since I only have a i686-w64-mingw32 cross-compilation toolchain available right now. I can revise the patch or the whole series next week if you want.
>From 7bbdad05e58fb2365bae5b4ed61c2cf4af9619c7 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Fri, 1 Feb 2013 20:22:21 +0100 Subject: [PATCH 5/5] Rename variable and re-implement original behaviour exactly * choose.cc (OnInit): When a package is from category "Base" or "Misc" is found uninstalled, select it for installation. This re-implements the previous behaviour for this situation when there are manual selections on the CLI and "--upgrade-also" is not given. * choose.h: Rename PackageCategoryOptions to hasManualSelections. * choose.cc (OnInit): Rename PackageCategoryOptions to hasManualSelections. * package_meta.cc (isManuallyWanted): Rename PackageCategoryOptions to hasManualSelections. * package_meta.cc (isManuallyDeleted): Rename PackageCategoryOptions to hasManualSelections. --- setup/choose.cc | 5 ++++- setup/choose.h | 2 +- setup/package_meta.cc | 10 +++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/setup/choose.cc b/setup/choose.cc index 70aafaf..57d06f2 100755 --- a/setup/choose.cc +++ b/setup/choose.cc @@ -248,10 +248,13 @@ ChooserPage::OnInit () i != db.packages.end (); ++i) { packagemeta & pkg = *(i->second); + bool basemisc = !pkg.installed + && ( categories.find ("Base") != categories.end () + || categories.find ("Misc") != categories.end ()); bool wanted = pkg.isManuallyWanted(); bool deleted = pkg.isManuallyDeleted(); bool current = pkg.curr || CleanOrphansOption; - bool upgrade = wanted || UpgradeAlsoOption || !PackageCategoryOptions; + bool upgrade = wanted || basemisc || UpgradeAlsoOption || !hasManualSelections; bool install = wanted && !deleted && !pkg.installed; bool reinstall = wanted && deleted; bool uninstall = !wanted && deleted; diff --git a/setup/choose.h b/setup/choose.h index 86e9dc6..9dc5882 100755 --- a/setup/choose.h +++ b/setup/choose.h @@ -21,7 +21,7 @@ #include "package_meta.h" #include "PickView.h" -extern bool PackageCategoryOptions; +extern bool hasManualSelections; class ChooserPage:public PropertyPage { diff --git a/setup/package_meta.cc b/setup/package_meta.cc index ac20e7d..fbb7a68 100755 --- a/setup/package_meta.cc +++ b/setup/package_meta.cc @@ -55,7 +55,7 @@ static StringArrayOption DeletePackageOption ('x', "remove-packages", "Specify p static StringArrayOption DeleteCategoryOption ('c', "remove-categories", "Specify categories to uninstall"); static StringArrayOption PackageOption ('P', "packages", "Specify packages to install"); static StringArrayOption CategoryOption ('C', "categories", "Specify entire categories to install"); -bool PackageCategoryOptions = 0; +bool hasManualSelections = 0; /*****************/ @@ -311,9 +311,9 @@ bool packagemeta::isManuallyWanted() const { static bool parsed_yet = false; static std::set<string> parsed_names; - PackageCategoryOptions |= parsed_names.size (); + hasManualSelections |= parsed_names.size (); static std::set<string> parsed_categories; - PackageCategoryOptions |= parsed_categories.size (); + hasManualSelections |= parsed_categories.size (); bool bReturn = false; /* First time through, we parse all the names out from the @@ -361,9 +361,9 @@ bool packagemeta::isManuallyDeleted() const { static bool parsed_yet = false; static std::set<string> parsed_delete; - PackageCategoryOptions |= parsed_delete.size (); + hasManualSelections |= parsed_delete.size (); static std::set<string> parsed_delete_categories; - PackageCategoryOptions |= parsed_delete_categories.size (); + hasManualSelections |= parsed_delete_categories.size (); bool bReturn = false; /* First time through, we parse all the names out from the -- 1.8.1.2
Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf Blofeld V1.15B11: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada