summaryrefslogtreecommitdiff
path: root/Master/texmf
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-07-02 05:11:36 +0000
committerNorbert Preining <preining@logic.at>2009-07-02 05:11:36 +0000
commit26fc6689f0b86c8bba55fa329c7ee308fb1c37d5 (patch)
treef64a82e1ba117646362e0d4e31b9543e0dd22c27 /Master/texmf
parent345f23204f61566cbb90dd370dea2caf28ecbcfc (diff)
tlmgr check executes: warn if a the location of the map files and its execute
statement are in different packages git-svn-id: svn://tug.org/texlive/trunk@14063 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf')
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl44
1 files changed, 29 insertions, 15 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 2a1c09ce5c5..23368a4f323 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -2697,21 +2697,35 @@ sub check_executes {
}
my %badmaps;
foreach my $mf (keys %maps) {
- my @found = $localtlpdb->find_file($mf);
- if ($#found < 0) {
- $badmaps{$mf} = $maps{$mf};
- }
- if ($#found > 0) {
- # we want to check for multiple inclusions
- my %mapfn;
- foreach my $foo (@found) {
- $foo =~ m/^(.*):(.*)$/;
- push @{$mapfn{$2}}, $1;
- }
- foreach my $k (keys %mapfn) {
- my @bla = @{$mapfn{$k}};
- if ($#bla > 0) {
- warn "map file $mf occurs multiple times (in pkg @bla)!\n";
+ my @pkgsfound = @{$maps{$mf}};
+ if ($#pkgsfound > 0) {
+ tlwarn ("map file $mf is referenced in the executes of @pkgsfound\n");
+ } else {
+ # less then 1 occurrences is not possible, so we have only one
+ # package that contains the reference to that map file
+ my $pkgfoundexecute = $pkgsfound[0];
+ my @found = $localtlpdb->find_file($mf);
+ if ($#found < 0) {
+ $badmaps{$mf} = $maps{$mf};
+ } elsif ($#found > 0) {
+ # we want to check for multiple inclusions
+ my %mapfn;
+ foreach my $foo (@found) {
+ $foo =~ m/^(.*):(.*)$/;
+ push @{$mapfn{$2}}, $1;
+ }
+ foreach my $k (keys %mapfn) {
+ my @bla = @{$mapfn{$k}};
+ if ($#bla > 0) {
+ tlwarn ("map file $mf occurs multiple times (in pkg @bla)!\n");
+ }
+ }
+ } else {
+ # only one occurrence found, we check that the map is also contained
+ # in the right package!
+ my ($pkgcontained) = ( $found[0] =~ m/^(.*):.*$/ );
+ if ($pkgcontained ne $pkgfoundexecute) {
+ tlwarn("map file $mf: execute in $pkgfoundexecute, map file in $pkgcontained\n");
}
}
}