This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps 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]

[setup - the official Cygwin setup program] branch master, updated. release_2.891-2-ga176683




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;h=a1766832dda3e2594c5f0b18602daf753ebe7c8f

commit a1766832dda3e2594c5f0b18602daf753ebe7c8f
Author: Ken Brown <kbrown@cornell.edu>
Date:   Wed Mar 21 14:03:00 2018 -0400

    Give a fatal error on a checksum failure during install
    
    This only affects local installs, where the hash of an archive is not
    checked until we reach do_install_thread().  At this point it seems
    too late to recover safely.


Diff:
---
 install.cc |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/install.cc b/install.cc
index 37dea6f..b5adcc6 100644
--- a/install.cc
+++ b/install.cc
@@ -850,7 +850,15 @@ do_install_thread (HINSTANCE h, HWND owner)
       }
       catch (Exception *e)
       {
-        yesno (owner, IDS_SKIP_PACKAGE, e->what());
+	// We used to give the user a yes/no option to skip this
+	// package (with "no" meaning install it even though the
+	// archive is corrupt), but both options could damage the
+	// user's system.  In the absence of a safe way to recover, we
+	// just bail out.
+	if (e->errNo() == APPERR_CORRUPT_PACKAGE)
+	  fatal (owner, IDS_CORRUPT_PACKAGE, version.Name().c_str());
+	// Unexpected exception.
+	throw e;
       }
       {
         md5sum_total_bytes_sofar += version.source()->size;


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