summaryrefslogtreecommitdiff
path: root/Master/install-tl
diff options
context:
space:
mode:
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
}
}