Requirements depth in setup.exe

Christopher Faylor
Fri Jun 27 00:26:00 GMT 2008

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
> 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 <>
>	*, package_meta.h,, 
>	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

Can someone look at this and consider it for the trunk and the branch?

Thanks for the patch.


More information about the Cygwin-apps mailing list