diff options
author | Norbert Preining <preining@logic.at> | 2013-03-31 23:00:10 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2013-03-31 23:00:10 +0000 |
commit | b5ccc582ec4c5dc4f4a709a8eed6f96a5d8d673d (patch) | |
tree | 133269e4248a87fa10418592e43e6a884e2be7e1 /Master | |
parent | aa9c9884cecb845859c83ac270062f670ec12af9 (diff) |
fix some peculiarities of the pinning action
git-svn-id: svn://tug.org/texlive/trunk@29568 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-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"); |