summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-05-01 10:26:44 +0000
committerNorbert Preining <preining@logic.at>2016-05-01 10:26:44 +0000
commita07702b39986ecaebc17e432b933b22d13681038 (patch)
tree4ec6536e94c2944577acec7ee01bca493bb9b646 /Master/install-tl
parent36f524f95532db74cc7e572c5b45b69136db4f92 (diff)
install-tl: setup checksum method, allow to continue
git-svn-id: svn://tug.org/texlive/trunk@40819 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/install-tl')
-rwxr-xr-xMaster/install-tl35
1 files changed, 28 insertions, 7 deletions
diff --git a/Master/install-tl b/Master/install-tl
index 64a08d692b2..42643211afd 100755
--- a/Master/install-tl
+++ b/Master/install-tl
@@ -167,8 +167,10 @@ my $opt_version = 0;
my $opt_force_arch;
my $opt_persistent_downloads = 1;
my $opt_allow_ftp = 0;
-my $opt_verify_downloads = 1;
+# don't set this to a value, see below
+my $opt_verify_downloads;
$::opt_select_repository = 0;
+my $opt_warn_checksums = 1;
# show all options even those not relevant for that arch
$::opt_all_options = 0;
@@ -226,6 +228,7 @@ GetOptions(
"select-repository" => \$::opt_select_repository,
"verify-downloads!" => \$opt_verify_downloads,
"version" => \$opt_version,
+ "warn-checksums!" => \$opt_warn_checksums,
"help|?" => \$opt_help) or pod2usage(1);
if ($opt_gui eq "") {
@@ -341,12 +344,30 @@ if ($opt_print_arch) {
exit 0;
}
-# try to setup gpg
-if ($opt_verify_downloads) {
- if (TeXLive::TLCrypto::setup_gpg($::installerdir)) {
- log("Trying to verify cryptographic signatures!\n")
- } else {
- tlwarn("Couldn't detect gpg so will proceed without verification!\n");
+if (TeXLive::TLCrypto::setup_checksum_method()) {
+ # try to setup gpg:
+ # either explicitly requested or nothing requested
+ if ((defined($opt_verify_downloads) && $opt_verify_downloads)
+ ||
+ (!defined($opt_verify_downloads))) {
+ if (TeXLive::TLCrypto::setup_gpg($::installerdir)) {
+ log("Trying to verify cryptographic signatures!\n")
+ } else {
+ if ($opt_verify_downloads) {
+ tldie("No gpg found, verification explicitly requested on command line, quitting.\n");
+ } else {
+ # implicitly requested, just
+ debug("Couldn't detect gpg so will proceed without verification!\n");
+ }
+ }
+ }
+} else {
+ if ($opt_warn_checksums) {
+ tldie(<<END_NO_CHECKSUMS);
+Warning: Cannot find a checksum implementation.
+Please install Digest::SHA (from CPAN), openssl, or sha512sum,
+or use --no-warn-checksums command line!
+END_NO_CHECKSUMS
}
}