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

Pavel Tsekov ptsekov@gmx.net
Tue Jun 18 16:52:00 GMT 2002


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygpackage.cc.diff
Type: application/octet-stream
Size: 602 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020618/d092cddf/attachment.obj>
-------------- next part --------------
--
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/


More information about the Cygwin mailing list