summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2016-04-12 06:14:41 +0000
committerNorbert Preining <preining@logic.at>2016-04-12 06:14:41 +0000
commitc448f137d508d183c1f2bca44cafddb0ad0b2db0 (patch)
tree9186f2c60221bf704f93e042e1a847f40eab6b8d /Master
parentd8ace64a5feabf77b56ad53989963c08a0f84532 (diff)
tlmgr: option --(no-)verify-downloads together with config file setting
git-svn-id: svn://tug.org/texlive/trunk@40466 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl35
1 files changed, 27 insertions, 8 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 5644095a598..05e626ec8e3 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -338,6 +338,7 @@ sub main {
"print-platform|print-arch" => 1,
"usermode|user-mode" => 1,
"usertree|user-tree" => "=s",
+ "verify-downloads" => "!",
"version" => 1,
);
@@ -544,14 +545,6 @@ for the full story.\n";
}
#
- # setup gpg if available
- if (TeXLive::TLUtils::setup_gpg($Master)) {
- log("Trying to verify cryptographic signatures!\n")
- } else {
- tlwarn("Setting up gpg did not succeed!\n");
- }
-
- #
# the main tree we will be working on
$::maintree = $Master;
if ($opts{"usermode"}) {
@@ -629,6 +622,21 @@ for the full story.\n";
}
}
+ #
+ # setup gpg if available
+ # first line: --(no-)verify-downloads was passed in (opts defined)
+ # second line: not passed in but in config
+ if ((defined($opts{"verify-downloads"}) && $opts{"verify-downloads"})
+ ||
+ (!defined($opts{"verify-downloads"}) && $config{"verify-downloads"})) {
+ if (TeXLive::TLUtils::setup_gpg($Master)) {
+ log("Trying to verify cryptographic signatures!\n")
+ } else {
+ tlwarn("Setting up gpg did not succeed!\n");
+ }
+ }
+
+
my $ret = execute_action($action, @ARGV);
# F_ERROR stops processing immediately, and prevents postactions from
@@ -6016,6 +6024,8 @@ sub load_config_file {
#
# by default we remove packages
$config{"auto-remove"} = 1;
+ #
+ $config{"verify-downloads"} = 1;
# loads system config file, this cannot be changes with tlmgr
chomp (my $TEXMFSYSCONFIG = `kpsewhich -var-value=TEXMFSYSCONFIG`);
@@ -6068,6 +6078,15 @@ sub load_options_from_config {
tlwarn("$prg: $fn: Unknown value for auto-remove: $val\n");
}
+ } elsif ($key eq "verify-downloads") {
+ if ($val eq "0") {
+ $config{"verify-downloads"} = 0;
+ } elsif ($val eq "1") {
+ $config{"verify-downloads"} = 1;
+ } else {
+ tlwarn("$prg: $fn: Unknown value for verify-downloads: $val\n");
+ }
+
} elsif ($sysmode) {
# keys here are only allowed in sys mode
if ($key eq "allowed-actions") {