public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [setup - the official Cygwin setup program] branch master, updated. release_2.891-2-ga176683
@ 2018-03-22 22:03 jturney
0 siblings, 0 replies; only message in thread
From: jturney @ 2018-03-22 22:03 UTC (permalink / raw)
To: cygwin-apps-cvs
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-22 22:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-22 22:03 [setup - the official Cygwin setup program] branch master, updated. release_2.891-2-ga176683 jturney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).