[PATCH] setup.exe case-insensitive package sorting
Thu Sep 13 04:46:00 GMT 2012
This patch is incomplete, but I've been fighting this for four hours
now. I'm tired, hungry, and frustrated, so in case I don't get back to
finishing this, I decided to just post what I have so far.
The point of the patch is to get the Select Packages screen's package
lists to sort case-insensitively.
(This saga began after I spent far too long looking for the R package
down in the bottom third of the Interpreters category.)
The patch works for the flat views only. I have yet to figure out how
to do the same for the Category tree view, since that is treated as a
completely separate exception case in the code.
(Any setup.exe hackers want to opine on whether it's reasonable for it
to have required 3 hours of spelunking through the package DB reader,
the INI file parser, and the dialog chaining system to find out where to
even begin attempting the patch? Did I make par? Was there a map to
this twisty maze of global variables that I missed?)
When I dove in, I expected to find setup.exe sorting its package list
ASCIIbetically somewhere, making this an easy fix, but no. In fact, it
doesn't sort the package list internally at all. You can find std::map
overridden with casecompare_lt_op sorting in a few places, but I've
proven to myself that the solution doesn't lie down this alley.
Proof: Open setup.ini in a text editor, and move the R package down to
the bottom of the file. Run setup.exe in "install from local disk" mode
so it doesn't blow away your changes with a copy from the Internet, get
to the Select Packages screen, and open the Interpreters category. R is
now at the bottom of the category, instead of at the top. Ergo,
setup.exe is getting its package sort order from the ini file, not doing
any sorting internally. Not in a way that affects this screen, anyway.
I expect fixing upset would have been easier in the end, but I didn't
want to be yelled at. (SHTDI!)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2554 bytes
Desc: not available
More information about the Cygwin-apps