Robert Collins wrote: > 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.
I'm not that bothered, I can easily delete 3 lines at the same time as I add "#define DEBUG 1", but seriously, have you ever actually clicked OK 171 times to proceed through all the ldescs in setup.ini ? > > 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). OK. Thanks. > > 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<>. I said novice! I just declared it as an int, and then grabbed the type from the gcc error. > Secondly, the usual way is to typedef the type within the class, giving > Categories::categorylisttype::const_iterator = .... packagemeta::categories is defined directly as a set <String, String::caseless>. Are you saying that I should create a categorylisttype type? Or can I just use set<String, String::caseless>::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. Will rework and resubmit. Max.