diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-18 22:23:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-18 22:23:44 +0000 |
commit | 81794ddb2a32c45772a8826df77aefd0715c2efd (patch) | |
tree | 15e1db3a871dcff8b1c34e3ad27646e8080710df /Master/tlpkg | |
parent | 182f384a817a982e1f078a496b68cae8edacb777 (diff) |
TLUtils.pm (setup_gpg): if the envvar is set, don't look for anything else.
tlmgr.pl (main): die if --verify-downloads and no gpg; only log if no gpg
and only requested in config.
git-svn-id: svn://tug.org/texlive/trunk@40601 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index bfdb55d1087..2db7533b0c1 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -3643,13 +3643,14 @@ sub tlchecksum_data { =item C<< setup_gpg() >> -Tries to set up gpg command line C<$::gpg> used for -verification of downloads. Checks first for the environment variable -C<TEXLIVE_GNUPG>, then for C<gpg>, and finally for C<gpg2>. -Further adaption of the invocation of C<gpg> can be done using the -two enviroment variables C<TL_GNUPGHOME>, which is passed to -C<gpg> with C<--homedir>, and C<TL_GNUPGARGS>, which replaces the -default arguments C<--no-secmem-warning --no-permission-warning>. +Tries to set up gpg command line C<$::gpg> used for verification of +downloads. Checks for the environment variable C<TL_GNUPG>; if that +envvar is not set, first C<gpg>, then C<gpg2>, then, on Windows only, +C<tlpkg/installer/gpg/gpg.exe> is looked for. Further adaptation of the +invocation of C<gpg> can be done using the two enviroment variables +C<TL_GNUPGHOME>, which is passed to C<gpg> with C<--homedir>, and +C<TL_GNUPGARGS>, which replaces the default arguments +C<--no-secmem-warning --no-permission-warning>. Returns 1/0 on success/failure. @@ -3686,25 +3687,29 @@ sub setup_gpg { my $found = 0; my $prg; if ($ENV{'TL_GNUPG'}) { + # if envvar is set, don't look for anything else. $prg = test_one_gpg($ENV{'TL_GNUPG'}); $found = 1 if ($prg); - } - if (!$found) { + } else { + # no envvar, look for gpg $prg = test_one_gpg('gpg'); $found = 1 if ($prg); - } - if (!$found) { - $prg = test_one_gpg('gpg2'); - $found = 1 if ($prg); - } - if (!$found && $^O =~ /^MSWin/i) { - # test on windows also a shipped version from texlive.gpg.win32 - if (-r "$master/tlpkg/installer/gpg/gpg.exe") { - $prg = "$master/tlpkg/installer/gpg/gpg.exe"; - $found = 1; + + # no gpg, look for gpg2 + if (!$found) { + $prg = test_one_gpg('gpg2'); + $found = 1 if ($prg); + } + if (!$found && $^O =~ /^MSWin/i) { + # test on windows also a shipped version from texlive.gpg.win32 + if (-r "$master/tlpkg/installer/gpg/gpg.exe") { + $prg = "$master/tlpkg/installer/gpg/gpg.exe"; + $found = 1; + } } } return 0 if (!$found); + # ok, we found one # Set up the gpg invocation: $::gpg = "$prg "; |