Requirements depth in setup.exe
Reini Urban
rurban@x-ray.at
Fri Jun 27 13:02:00 GMT 2008
Christopher Faylor schrieb:
> On Thu, Jun 26, 2008 at 05:46:22PM -0500, Thrall, Bryan wrote:
>> We have a custom cygwin mirror for distributing our software and
>> occasionally run into problems where a package that is listed in the
>> setup.ini as being required isn't installed like it should be. For
>> example, xterm is required (eventually) but isn't installed by default.
>> The problem seems to be a limitation in setup.exe:
>> packageversion::set_requirements() has a hardcoded recursion depth of
>> 5, and as best I can tell, xterm for our purposes has a depth of 6.
>> Increasing the limit to 20 allowed xterm to be set to install like it
>> should be.
>>
>> It occurred to me, without any evidence whatsoever, this limit might
>> also explain the messages on cygwin-users about people who don't get
>> certain required packages installed (such as
>> http://cygwin.com/ml/cygwin/2008-01/msg00439.html) even though they are
>> listed as required.
>>
>> This seems like a harsh recursion limit, especially as the number of
>> Cygwin packages grows; please consider the attached patch (based on CVS
>> HEAD) for a (IMHO) better solution which does not recurse once a
>> particular package has been visited.
>
> Wow, I'll say it sounds harsh. Five? I had no idea it was that low.
>
>> ChangeLog entry:
>>
>> 2008-06-26 Bryan Thrall <bryan.thrall@flightsafety.com>
>>
>> * package_meta.cc, package_meta.h, package_version.cc,
>> package_version.h: Keep track of visited packages instead
>> of hardcoding maximum depth to avoid unlimited recursion.
>
> I just eyeballed the change. I like the way you implemented it but
> I'll defer to the people who are more familiar with the code.
>
> But, even if the change isn't accepted I'd say that we probably owe
> you a debt of gratitude for tracking this down. I wouldn't be surprised
> if you are right and this is responsible for many strange dependency
> problems.
>
> Can someone look at this and consider it for the trunk and the branch?
>
> Thanks for the patch.
Tracked at http://sourceware.org/bugzilla/show_bug.cgi?id=6699
I left the default assignee to cygwin-apps@ to test the recent change
but apparently the notification email didn't arrive here.
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
More information about the Cygwin-apps
mailing list