diff options
author | Norbert Preining <preining@logic.at> | 2019-06-27 00:51:49 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-06-27 00:51:49 +0000 |
commit | 80a3c0c93696d93ef69fb9fc7436c30d8ef88911 (patch) | |
tree | 662918a268ec9eac19d7309515da145d84b71ec0 /Master/tlpkg/TeXLive | |
parent | cc912630e4592227bef3c67146383be98fbcebe5 (diff) |
pinning: don't warn on not-hit pattern in case of catch-all presence
If a pin
repo:*
is found, we don't warn that a pattern
repo:package
is not matched. Any other glob line than * will trigger warnings, i.e.
repo:*a*
repo:package
will give a warning that the second line is not matched, as before.
git-svn-id: svn://tug.org/texlive/trunk@51487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 902f8e7586f..f1266e6d1f8 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -2816,6 +2816,21 @@ sub check_evaluate_pinning { # the default main:* is always considered to be matched $mainpin->{'hit'} = 1; push @pins, $mainpin; + # # sort pins so that we first check specific lines without occurrences of + # # special characters, and then those with special characters. + # # The definitions are based on glob style rules, saved in $pp->{'glob'} + # # so we simply check whether there is * or ? in the string + # @pins = sort { + # my $ag = $a->{'glob'}; + # my $bg = $b->{'glob'}; + # my $cAs = () = $ag =~ /\*/g; # number of * in glob of $a + # my $cBs = () = $bg =~ /\*/g; # number of * in glob of $b + # my $cAq = () = $ag =~ /\?/g; # number of ? in glob of $a + # my $cBq = () = $bg =~ /\?/g; # number of ? in glob of $b + # my $aVal = 2 * $cAs + $cAq; + # my $bVal = 2 * $cBs + $cBq; + # $aVal <=> $bVal + # } @pins; for my $pkg (keys %pkgs) { PINS: for my $pp (@pins) { my $pre = $pp->{'re'}; @@ -2829,8 +2844,16 @@ sub check_evaluate_pinning { } } # check that all pinning lines where hit + # If a repository has a catch-all pin + # foo:* + # then we do not warn about any other pin (foo:abcde) not being hit. + my %catchall; + for my $p (@pins) { + $catchall{$p->{'repo'}} = 1 if ($p->{'glob'} eq "*"); + } for my $p (@pins) { next if defined($p->{'hit'}); + next if defined($catchall{$p->{'repo'}}); tlwarn("tlmgr (TLPDB): pinning warning: the package pattern ", $p->{'glob'}, " on the line:\n ", $p->{'line'}, "\n does not match any package\n"); |