public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin-apps@cygwin.com
Subject: [[PATCH setup topic/libsolv] 1/2] packagedb::removeEmptyCategories: Don't remove "Base"
Date: Sat, 28 Oct 2017 12:29:00 -0000	[thread overview]
Message-ID: <20171028122932.3024-1-kbrown@cornell.edu> (raw)

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

             reply	other threads:[~2017-10-28 12:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 12:29 Ken Brown [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171028122932.3024-1-kbrown@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).