diff options
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 79c49b102f5..3384a3604c7 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -3549,7 +3549,13 @@ sub action_pinning { } my $repo = shift @ARGV; my @ov = $pf->value($repo); - push @ov, @ARGV; + for my $n (@ARGV) { + if (member($n, @ov)) { + info("$prg: already pinned to $repo: $n\n"); + } else { + push @ov, $n; + } + } $pf->value($repo, @ov); $remotetlpdb->virtual_update_pins(); $pf->save; @@ -3579,7 +3585,15 @@ sub action_pinning { for my $pf (@ov) { push (@nv, $pf) if (!member($pf, @ARGV)); } - $pf->value($repo, @nv); + if ($#ov == $#nv) { + info("$prg: no changes in pinning data for $repo\n"); + return 1; + } + if (@nv) { + $pf->value($repo, @nv); + } else { + $pf->delete_key($repo); + } $remotetlpdb->virtual_update_pins(); $pf->save; info("$prg: removed pinning data for repository $repo: @ARGV\n"); |