This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [[PATCH setup topic/libsolv] 1/2] packagedb::removeEmptyCategories: Don't remove "Base"


On 29/10/2017 21:18, Ken Brown wrote:
On 10/29/2017 1:24 PM, Jon Turney wrote:
Hmm... now I remember my other concerns about this piece of code: as written, it's just wrong.

1. Applying erase to packagedb:categories invalidates the iterator
2. We're incrementing the iterator after doing an erase, so even if the iterator was still valid, we skip checking if the following category is empty

So maybe the right way to fix this is as attached:

Yes.  I wrongly jumped to the conclusion that removing Base was the issue.

I need to stare as this a bit more to understand where the 'base' category is coming from when we have no setup.ini...

I guess it's created implicitly in the 'for' statement in packagedb::makeBase().  That's probably a mistake.

Ah yes, I guess this could check if the 'base' category exists first.

This is all a bit broken though. Because we've forgotten the categories of installed packages, if we're run without a setup.ini, we'll merrily let packages in the base category get uninstalled without complaint...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]