diff options
author | Norbert Preining <preining@logic.at> | 2019-09-07 05:32:39 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2019-09-07 05:32:39 +0000 |
commit | 820a79a5905928ed47b9289b8f3112383bee3000 (patch) | |
tree | 7ba4fef0cc0e3ce2548a4eb1dbe3128fed3a260e /Master | |
parent | 18f0e50f950839d08d069b96aea7a5cdd961fc0b (diff) |
tlmgr: add check texmfdbs
1) all trees listed in $TEXMFDBS are specified with !! and have an ls-R, while
2) all trees in $TEXMF that are not in $TEXMFDBS
do not have !! and do not have an ls-R.
git-svn-id: svn://tug.org/texlive/trunk@52045 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 8b626023c91..a41bff2b3a4 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -5340,6 +5340,8 @@ sub action_check { $ret |= check_executes(); print "Running check runfiles:\n"; $ret |= check_runfiles(); + print "Running check texmfdb paths\n"; + $ret |= check_texmfdbs(); } elsif ($what =~ m/^files/i) { my $tltree = init_tltree($svn); $ret |= check_files($tltree); @@ -5352,6 +5354,8 @@ sub action_check { $ret |= check_runfiles(); } elsif ($what =~ m/^executes/i) { $ret |= check_executes(); + } elsif ($what =~ m/^texmfdbs/i) { + $ret |= check_texmfdbs(); } else { print "No idea how to check that: $what\n"; } @@ -5842,6 +5846,49 @@ sub check_depends { return $ret; } +sub check_texmfdbs { + +#!/usr/bin/perl + my $texmfdbs = `kpsewhich -var-value TEXMFDBS`; + my @tfmdbs = glob $texmfdbs; + my $tfms = `kpsewhich -var-value TEXMF`; + my @tfms = glob $tfms; + my %tfmdbs; + my $ret = 0; + + print "Checking TEXMFDBS\n"; + for my $p (@tfmdbs) { + print "-> $p\n"; + if ($p !~ m/^!!/) { + printf "Warn: entry $p in TEXMFDBS does not have leading !!\n"; + $ret++; + } + $p =~ s/^!!//; + $tfmdbs{$p} = 1; + if (! -r "$p/ls-R") { + printf "Warn: entry $p does not have an associated ls-R\n"; + $ret++; + } + } + + print "Checking TEXMF\n"; + for my $p (@tfms) { + print "-> $p\n"; + my $pnobang = $p; + $pnobang =~ s/^!!//; + if (! $tfmdbs{$pnobang}) { + if ($p =~ m/^!!/) { + printf "Warn: tree $p in TEXMF is not in TEXMFDBS but has !!\n"; + $ret++; + } + if (-r "$pnobang/ls-R") { + printf "Warn: tree $p in TEXMF is not in TEXMFDBS but has ls-R file\n"; + $ret++; + } + } + } + return($ret); +} # POSTACTION # |