On Sun, 9 Mar 2003, Cygwin (Robert Collins) wrote:

> > * Pavel's "Do not uninstall if upgrade package fails md5" patch
> > http://sources.redhat.com/ml/cygwin-apps/2003-02/msg00178.html
> 
> Pavel,
> This patch was missing IDS_CRC_ERROR definitions, even though it used
> it.
> 
> Tsk!
> 
> I've applied it anyway by reusing IDS_CORRUPT_PACKAGE, but, please,
> don't do this to me.

Bad, bad Pavel.

IDS_CRC_ERROR was meant to be replaced by IDS_SKIP_PACKAGE, but for some 
reason I've failed to fix it before generating the patch.

> You'll need to submit a patch to add and use IDS_CRC_ERROR with whatever
> text you intended.

See attached.

There was a small bug in the previous patch. A fix is also included.

Changelog entry:

2003-03-09  Pavel Tsekov  <[EMAIL PROTECTED]>

        * install.cc (do_install_thread): Use IDS_SKIP_PACKAGE 
        instead of IDS_CORRUPT_PACKAGE when asking the user to take
        action if the hash verification check fails for a source package.
        Do not increase the value of 'total_bytes' variable if the
        user chooses to skip over a package, which failed the hash
        verification.


Index: install.cc
===================================================================
RCS file: /cvs/cygwin-apps/setup/install.cc,v
retrieving revision 2.56
diff -u -p -r2.56 install.cc
--- install.cc  9 Mar 2003 01:39:42 -0000       2.56
+++ install.cc  9 Mar 2003 21:48:22 -0000
@@ -500,7 +500,7 @@ do_install_thread (HINSTANCE h, HWND own
                      pkg.desired.pick (false);
                    }
                }
-             if (do_skip != 0)
+             if (!do_skip)
                total_bytes += pkg.desired.source()->size;
            }
          if (pkg.desired.sourcePackage ().picked())
@@ -512,13 +512,13 @@ do_install_thread (HINSTANCE h, HWND own
                }
              catch (Exception *e)
                {
-                 if (yesno (owner, IDS_CORRUPT_PACKAGE, e->what()) == IDYES)
+                 if (yesno (owner, IDS_SKIP_PACKAGE, e->what()) == IDYES)
                    {
                      do_skip = 1;
                      pkg.desired.sourcePackage ().pick (false);
                    }
                }
-             if (do_skip != 0)
+             if (!do_skip)
                total_bytes += pkg.desired.sourcePackage ().source()->size;
            }
        }

Reply via email to