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: genini patch


On Sun, Feb 25, 2007 at 12:12:40PM +0100, Servaas Goossens wrote:
>Christopher Faylor wrote:
>> >* genini (parsedir): Use correct sorting order based on file versions
>> 
>> It's a lot more complicated than this if you want to get the sorting
>> right.  Maybe the setup.cc code could be of some use.
>
>You're right, it was a simplistic approach. Do you mean 
>version_compare.cc?

Probably.  I haven't looked at setup source code in a long time.

>I don't feel like re-implementing that in perl.  Instead I found
>Sort::Versions (apt-get install libsort-versions-perl).  The output
>looks good given the current release tree.  If you don't mind adding
>the dependency, it would keep the genini code small and simple.
>
>See the patch below.

Sorry but unless this is available in the cygwin distribution, I don't
think it's a good idea to rely on it.

>> >(parse): # in the middle of a line does not start a comment
>> 
>> Actually, yes it does.  It just doesn't start a comment in a quoted
>> string.  I haven't committed this since more work is needed.
>
>According to http://sourceware.org/cygwin-apps/setup-head.ini.html: 
>
>	"Any line beginning with # is ignored by setup and can be 
>	used to add commentary to the file."

We're talking about setup.hint, not setup.ini, but I wouldn't be
surprised if setup.exe also ignores #'s at the end of the line.  I do
know that they are supported whether they are currently used or not.

>All current setup.hint/ini files follow this rule.  If you also want to
>support end-of-line-comments, that's great.  Please consider committing
>my patch as a temporary measure until the final solution is ready.

Again, sorry but I am not really supporting genini.  I provided it as a
proof of concept when people thought they had a right to have some sort
of way to handle the awful complexity of setup.hint files.  Since there
is nothing important relying on it, I'm comfortable leaving it as is
until somebody does it the right way.  If this was a terrifically
difficult problem I might consider a stopgap but it is not.

cgf


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