summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/check-file-coverage
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-01-09 09:24:45 +0000
committerNorbert Preining <preining@logic.at>2008-01-09 09:24:45 +0000
commitea341a12e816631bdc6442ab40ec46c50ec368ed (patch)
tree0105b69f5f6503b6d8e3ed5809d80f0d477247e9 /Master/tlpkg/bin/check-file-coverage
parent3ecabbc06dc8296ef38eb3007259b5d69cc5be20 (diff)
check-file-coverage now reports the packages in which a file is
included in case of double inclusions and it ignores the files in 00texlive.installer git-svn-id: svn://tug.org/texlive/trunk@6161 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/check-file-coverage')
-rwxr-xr-xMaster/tlpkg/bin/check-file-coverage33
1 files changed, 31 insertions, 2 deletions
diff --git a/Master/tlpkg/bin/check-file-coverage b/Master/tlpkg/bin/check-file-coverage
index 0a38186078f..873a5fe2315 100755
--- a/Master/tlpkg/bin/check-file-coverage
+++ b/Master/tlpkg/bin/check-file-coverage
@@ -55,9 +55,38 @@ sub main
die "$0: Master $opt_master not a directory, goodbye.\n";
}
- # first we check for multiple included files using simple shell magic
+ # checking for duplicates
+ my $pack = "";
+ open (TLPDB,"<$opt_master/tlpkg/texlive.tlpdb")
+ or die "Cannot open $opt_master/tlpkg/texlive.tlpdb for reading: $!\n";
+ my %filetopacks;
+ while (<TLPDB>) {
+ # ignore files mentioned in 00texlive.installer
+ next if ($pack eq "00texlive.installer");
+ next if m/^\s*#/;
+ next if m/^\s*$/;
+ next if m/^((bin|run|doc|src)files|depend|execute|category|revision|shortdesc|longdesc|catalogue)/;
+ if (m/^name\s+(\S+)\s*$/) {
+ $pack = "$1";
+ next;
+ }
+ if (m/^ ([^\s]+)\s+/) {
+ push @{$filetopacks{$1}}, $pack;
+ next;
+ }
+ print "NOT HANDLED $_";
+ }
print "Multiple included files:\n";
- print `grep '^ ' $opt_master/tlpkg/texlive.tlpdb | awk '{print"\t"\$1}' | sort | uniq -d`;
+ foreach (keys %filetopacks) {
+ my @foo = @{$filetopacks{$_}};
+ if ($#foo < 0) {
+ warn "that shouldn't happen: $_\n";
+ } elsif ($#foo > 0) {
+ print " $_ (@foo)\n";
+ }
+ }
+ # first we check for multiple included files using simple shell magic
+ #print `grep '^ ' $opt_master/tlpkg/texlive.tlpdb | awk '{print"\t"\$1}' | sort | uniq -d`;
warn "$0: reading Master tree $opt_master, that takes some time ...\n";
my $tltree = TeXLive::TLTREE->new( "svnroot" => $opt_master );