From 0d11de1d3bdd70732215702fa366060087dfe66f Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 22 Apr 2016 15:13:09 +0000 Subject: check for gpg not avail, return -3 in verify_*, act in tlmgr git-svn-id: svn://tug.org/texlive/trunk@40681 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/texlive/tlmgr.pl | 3 +++ Master/tlpkg/TeXLive/TLCrypto.pm | 8 +++++--- Master/tlpkg/TeXLive/TLPDB.pm | 4 ++++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index efb8a465828..8ca99dabb80 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5927,6 +5927,9 @@ END_NO_INTERNET } elsif ($ret == -2) { # the remote database has not be signed, warn debug("$0: remote database is not signed, continuing anyway!\n"); + } elsif ($ret == -3) { + # no gpg available + debug("$0: no gpg available for verification, continuing anyway!\n"); } elsif ($ret == 1) { # no problem, checksum is wrong, we need to get new tlpdb } elsif ($ret == 2) { diff --git a/Master/tlpkg/TeXLive/TLCrypto.pm b/Master/tlpkg/TeXLive/TLCrypto.pm index 5c74beed9d3..2b0203ad348 100644 --- a/Master/tlpkg/TeXLive/TLCrypto.pm +++ b/Master/tlpkg/TeXLive/TLCrypto.pm @@ -129,7 +129,8 @@ Verifies that C<$file> has checksum C<$checksum_url>, and if gpg is available also verifies that the checksum is signed. Returns 0 on success, -1 on connection error, -2 on missing signature -file, 1 on checksum, and 2 on signature errors. +file, -3 if no gpg program is available, 1 on checksum, +and 2 on signature errors. In case of errors returns an informal message as second argument. =cut @@ -275,7 +276,8 @@ sub test_one_gpg { Verifies a download of C<$url> into C<$file> by cheking the gpg signature in C<$url.asc>. -Returns 0 on success, -2 on missing signature file, 2 on signature error. +Returns 0 on success, -2 on missing signature file, 2 on signature error, +and -3 if no gpg is available. In case of errors returns an informal message as second argument. =cut @@ -312,7 +314,7 @@ GPGERROR } else { debug("gpg prog not defined, no checking of signatures\n"); # we return 0 (= success) if not gpg is available - return(0); + return(-3, "no gpg available"); } # not reached return (0); diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 44d4e62b597..83f618e8f00 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -373,6 +373,8 @@ sub from_file { tldie("$0: connection problems, cannot download: $m\n"); } elsif ($r == -2) { debug("$0: remote database checksum is not signed, continuing anyway!\n"); + } elsif ($r == -3) { + debug("$0: TLPDB: no gpg available, continuing anyway!\n"); } elsif ($r == 0) { $is_verified = 1; } else { @@ -391,6 +393,8 @@ sub from_file { tldie("$0: connection problems, cannot download: $m\n"); } elsif ($r == -2) { debug("$0: remote database checksum is not signed, continuing anyway!\n"); + } elsif ($r == -3) { + debug("$0: TLPDB: no gpg available, continuing anyway!\n"); } elsif ($r == 0) { $is_verified = 1; } else { -- cgit v1.2.3