[setup PATCH] Fix DEBUG mode in IniDBBuilderPackage, and improve Category column contents.

Robert Collins rbcollins@cygwin.com
Thu Sep 19 04:58:00 GMT 2002


On Thu, 2002-09-19 at 21:29, Max Bowsher wrote:
> Here is a patch for setup.
> 
> IniDBBuilderPackage.cc: Fix DEBUG mode
> Hunk 1: Remove a DEBUG message box which otherwise pops up once per package
> during ini parsing, thus rendering DEBUG unusable.

This stays for now. It's there because it was needed, and I don't think
that has changed yet.

> Hunk 2 & 3: Update DEBUG code to match current layout of data structures.

Thanks, I'll check these in shortly. (when I finished flushing my patch
queue).
 
> PickPackageLine.cc: Show all Categories in package list, not just the first
> alphabetically.
> NB1: I'm sure there is a more concise way to say "struct
> _Rb_tree_iterator<String,const String &,const String *>", but I'm an STL novice.

There is a much more compact way.
Firstly, this is not a _rb_tree. Check the header files. I think you'll
find it's a set<>.
Secondly, the usual way is to typedef the type within the class, giving
Categories::categorylisttype::const_iterator = ....

Thirdly, this should be a method on the package version
I.e.

class ...
....
  String getReadableCategoryList ();
...


That will allow factoring to cache if needed in the future.

It most certainly will be needed if you run setup over a debian Release
file - which is my current test case.

Cheers,
Rob.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20020919/f3fbc22a/attachment.sig>


More information about the Cygwin-apps mailing list