texlive[54064] Master/tlpkg/TeXLive/TLCrypto.pm: fix uninitialize

commits+preining at tug.org commits+preining at tug.org
Wed Mar 4 02:25:37 CET 2020


Revision: 54064
          http://tug.org/svn/texlive?view=revision&revision=54064
Author:   preining
Date:     2020-03-04 02:25:36 +0100 (Wed, 04 Mar 2020)
Log Message:
-----------
fix uninitialize variable warning when pubkey is missing

Modified Paths:
--------------
    trunk/Master/tlpkg/TeXLive/TLCrypto.pm

Modified: trunk/Master/tlpkg/TeXLive/TLCrypto.pm
===================================================================
--- trunk/Master/tlpkg/TeXLive/TLCrypto.pm	2020-03-04 00:48:13 UTC (rev 54063)
+++ trunk/Master/tlpkg/TeXLive/TLCrypto.pm	2020-03-04 01:25:36 UTC (rev 54064)
@@ -595,9 +595,12 @@
     debug("verification succeeded, output:\n$out\n");
     return ($VS_VERIFIED, $out);
   } else {
-    if (grep(/^\[GNUPG:\] NO_PUBKEY (.*)/, @status_lines)) {
-      debug("missing pubkey $1\n");
-      return ($VS_PUBKEY_MISSING, "missing pubkey $1");
+    my @nopb = grep(/^\[GNUPG:\] NO_PUBKEY /, @status_lines);
+    if (@nopb) {
+      my $mpk = $nopb[-1];
+      $mpk =~ s/^\[GNUPG:\] NO_PUBKEY //;
+      debug("missing pubkey $mpk\n");
+      return ($VS_PUBKEY_MISSING, "missing pubkey $mpk");
     }
     # we could do more checks on what is the actual problem here!
     return ($VS_SIGNATURE_ERROR, $out);



More information about the tex-live-commits mailing list.