[PATCH setup 03/10] Rename category "Misc" to "Orphaned"

Jon Turney jon.turney@dronecode.org.uk
Tue May 23 16:47:00 GMT 2017


Packages which have no category are placed into this category.  Since a
category is mandatory for all packages in setup.ini, this effectively means
packages which are "orphaned" in the sense that they are installed, but
don't appear in any setup.ini.

Usually it's safe to uninstall such packages (with --delete-orphans), unless
you are actually using them, or have locally built packages which rely on
them.
---
 choose.cc       | 2 +-
 package_db.cc   | 2 +-
 package_meta.cc | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/choose.cc b/choose.cc
index 2016caa..4ac5aae 100644
--- a/choose.cc
+++ b/choose.cc
@@ -260,7 +260,7 @@ ChooserPage::OnInit ()
       bool wanted    = pkg.isManuallyWanted();
       bool deleted   = pkg.isManuallyDeleted();
       bool basemisc  = (pkg.categories.find ("Base") != pkg.categories.end ()
-		     || pkg.categories.find ("Misc") != pkg.categories.end ());
+		     || pkg.categories.find ("Orphaned") != pkg.categories.end ());
       bool upgrade   = wanted || (!pkg.installed && basemisc)
 		     || UpgradeAlsoOption || !hasManualSelections;
       bool install   = wanted  && !deleted && !pkg.installed;
diff --git a/package_db.cc b/package_db.cc
index 3978421..dbec17e 100644
--- a/package_db.cc
+++ b/package_db.cc
@@ -435,7 +435,7 @@ packagedb::defaultTrust (trusts trust)
       packagemeta & pkg = *(i->second);
       if (pkg.installed
             || pkg.categories.find ("Base") != pkg.categories.end ()
-            || pkg.categories.find ("Misc") != pkg.categories.end ())
+            || pkg.categories.find ("Orphaned") != pkg.categories.end ())
         {
           pkg.desired = pkg.trustp (true, trust);
           if (pkg.desired)
diff --git a/package_meta.cc b/package_meta.cc
index b1db191..208b948 100644
--- a/package_meta.cc
+++ b/package_meta.cc
@@ -464,7 +464,7 @@ packagemeta::set_action (_actions action, packageversion const &default_version)
     {
       if (installed
 	  || categories.find ("Base") != categories.end ()
-	  || categories.find ("Misc") != categories.end ())
+	  || categories.find ("Orphaned") != categories.end ())
 	{
 	  desired = default_version;
 	  if (desired)
@@ -688,7 +688,7 @@ packagemeta::hasNoCategories() const
 void
 packagemeta::setDefaultCategories()
 {
-  add_category ("Misc");
+  add_category ("Orphaned");
 }
 
 void
-- 
2.12.3



More information about the Cygwin-apps mailing list