This is the mail archive of the cygwin@cygwin.com 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]

[PATCH] Setup 2.249.2.3 on Win2k hangs while uninstalling pack ages


Hello Robert,

Tuesday, June 18, 2002, 9:48:24 PM, you wrote:

RLO> I also have determined that three packages that are in
RLO> /etc/setup/installed.db
RLO> are missing from /etc/setup:

[snip]

Thanks to the hints Corey and you have provided I was able to pinpoint
the problem :)

Attached is a patch to fix the problem.

The rest is possibly only of interest to setup developers...

This was pretty nasty one... The String class was added a new
constructor accepting an 'int' at some point. This conflicts with
methods returning String objects which use the following construct
to indicate an error:

  if (FALSE)
     return 0;

The intent here was to return an empty string by calling the String
constructor which accepts 'const char *', but with the introduction of
the new constructor a String object with size of 1 is actually
returned - it contains the string "0" :)

I haven't checked the source for other occurences of such methods, but I
guess there may be more of them. I'll try to do this when I get some
more time (the weekend maybe).

Changelog:

It's somewhat lenghty, so you can tweak it to your likes :)

2002-06-18  Pavel Tsekov  <ptsekov@gmx.net>

            * cygpackage.cc (cygpackage::getfirstfile): Return a pointer
            to an empty C string, instead of int, so that the proper
            String constructor will be called.
            (cygpackage::getnextfile): Ditto.

Attachment: cygpackage.cc.diff
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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