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: Unbelievably obscure setup bug

On Nov 19 11:52, Jon TURNEY wrote:
> Whilst trying to write some other modifications to setup.exe, I've found what
> looks like an obscure bug introduced in the following change:
> > CVSROOT:	/sourceware/projects/cygwin-apps-home/cvsfiles
> > Module name:	setup
> > Changes by:	2009-05-07 14:14:59
> > 
> > Modified files:
> > 	.              : ChangeLog 
> > 
> > Log message:
> > 	* (ConnectedLoopFinder::doIt): Revert patch from
> > 	2008-08-29.  Add dumb hardcoded algorithm to make sure base-cygwin
> > 	and base-passwd are always the first packages in the postinstall
> > 	executable order.
> > 
> > Patches:
> >
> >
> This change to doesn't do what it claims as casecompare()
> returns 0 to indicate equality.
> Since db.packages is sorted alphabetically, it looks like it actually inserts
> the dependencies of the first (in alphabetical order) installed package
> (assuming that's not base-cygwin or base-passwd), twice.
> The log output actually shows this happening.  In my case aewm++ is the
> installed package which comes first in alphabetical order, which is why the
> logged dependency order list before running the postinstall scripts starts
> "Dependency order of packages: base-cygwin base-passwd cygwin libgcc1 libXau6
> libXdmcp6 libxcb1 libX11_6 libXext6 aewm++ aewm++ ..."
> Attached is the obvious patch to fix this, but I'm not sure that's right, as
> it runs base-passwd and base-cygwin in the opposite order to the comment
> ("Dependency order of packages: base-passwd cygwin base-cygwin ..."), which
> isn't very clear about if they merely both have to run first, or in a
> given order

The code in question was supposed to make sure that the order is always
"base-cygwin base-passwd [...]" and that was the case so far.  Of
course, given the obvious mishandling of the casecompare return value
it's not clear why this ever worked.  Even more mysterious is the fact
that the bugfix *breaks* this order.  Well, time to debug...


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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