public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [[PATCH setup topic/libsolv] 1/2] packagedb::removeEmptyCategories: Don't remove "Base"
@ 2017-10-28 12:29 Ken Brown
  2017-10-28 12:29 ` [[PATCH setup topic/libsolv] 2/2] Avoid clobbering installed.db when no setup.ini is found Ken Brown
  2017-10-29 17:24 ` [[PATCH setup topic/libsolv] 1/2] packagedb::removeEmptyCategories: Don't remove "Base" Jon Turney
  0 siblings, 2 replies; 7+ messages in thread
From: Ken Brown @ 2017-10-28 12:29 UTC (permalink / raw)
  To: cygwin-apps

This can be empty if no setup.ini files are found.  Removing it causes
setup to hang.
---
 package_db.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package_db.cc b/package_db.cc
index ac9387c..b104073 100644
--- a/package_db.cc
+++ b/package_db.cc
@@ -596,7 +596,7 @@ packagedb::removeEmptyCategories()
 {
   for (packagedb::categoriesType::iterator n = packagedb::categories.begin();
        n != packagedb::categories.end(); ++n)
-    if (!n->second.size())
+    if (!n->second.size() && n->first != "Base")
       {
         Log (LOG_BABBLE) << "Removing empty category " << n->first << endLog;
         packagedb::categories.erase (n++);
-- 
2.14.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-30 16:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-28 12:29 [[PATCH setup topic/libsolv] 1/2] packagedb::removeEmptyCategories: Don't remove "Base" Ken Brown
2017-10-28 12:29 ` [[PATCH setup topic/libsolv] 2/2] Avoid clobbering installed.db when no setup.ini is found Ken Brown
2017-10-28 17:29   ` Ken Brown
2017-10-29 17:24 ` [[PATCH setup topic/libsolv] 1/2] packagedb::removeEmptyCategories: Don't remove "Base" Jon Turney
2017-10-29 21:18   ` Ken Brown
2017-10-30 15:59     ` Jon Turney
2017-10-30 16:32       ` Ken Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).