summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm50
1 files changed, 43 insertions, 7 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index 6bbb37a1ad4..28dedc2fef5 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -202,6 +202,9 @@ sub make_tlpobj
my $usedefault = 1;
my @allpospats;
my @allnegpats;
+ #
+ # runpatterns
+ #
foreach my $p (@{$self->{'runpatterns'}}) {
if ($p =~ m/^\+!(.*)$/) {
push @allnegpats, $1;
@@ -219,7 +222,9 @@ sub make_tlpobj
if ($self->category eq "Package") {
foreach my $md (qw/bibtex context dvips fonts makeindex metafont
metapost mft omega scripts tex vtex/) {
- push @allpospats, "t texmf-dist $md $self->{'name'}";
+ # mark the default pattern with a leading * so that
+ # we do not warn a missing hit on a default pattern
+ push @allpospats, "*t texmf-dist $md $self->{'name'}";
}
}
}
@@ -229,6 +234,9 @@ sub make_tlpobj
foreach my $p (@allnegpats) {
$self->_do_normal_pattern($p,$tlp,$tltree,'run',1);
}
+ #
+ # srcpatterns
+ #
@allpospats = ();
@allnegpats = ();
$usedefault = 1;
@@ -248,9 +256,9 @@ sub make_tlpobj
if ($usedefault) {
# default patterns for srcfiles
if ($self->category eq "Package") {
- push @allpospats, "t texmf-dist source $self->{'name'}";
+ push @allpospats, "*t texmf-dist source $self->{'name'}";
} elsif ($self->category eq "Documentation") {
- push @allpospats, "t texmf-doc source $self->{'name'}";
+ push @allpospats, "*t texmf-doc source $self->{'name'}";
}
}
foreach my $p (@allpospats) {
@@ -259,6 +267,9 @@ sub make_tlpobj
foreach my $p (@allnegpats) {
$self->_do_normal_pattern($p,$tlp,$tltree,'src',1);
}
+ #
+ # docpatterns
+ #
@allpospats = ();
@allnegpats = ();
$usedefault = 1;
@@ -278,9 +289,9 @@ sub make_tlpobj
if ($usedefault) {
# default patterns for docfiles
if ($self->category eq "Package") {
- push @allpospats, "t texmf-dist doc $self->{'name'}";
+ push @allpospats, "*t texmf-dist doc $self->{'name'}";
} elsif ($self->category eq "Documentation") {
- push @allpospats, "t texmf-doc doc $self->{'name'}";
+ push @allpospats, "*t texmf-doc doc $self->{'name'}";
}
}
foreach my $p (@allpospats) {
@@ -289,6 +300,9 @@ sub make_tlpobj
foreach my $p (@allnegpats) {
$self->_do_normal_pattern($p,$tlp,$tltree,'doc',1);
}
+ #
+ # binpatterns
+ #
# no default patterns for binfiles
@allpospats = ();
@allnegpats = ();
@@ -309,7 +323,14 @@ sub make_tlpobj
my %archmatches = %$matchref;
my @archs = $tltree->architectures;
foreach my $arch (@archs) {
- $tlp->add_binfiles($arch,@{$archmatches{$arch}});
+ my @archfiles = ();
+ if (defined($archmatches{$arch})) {
+ @archfiles = @{$archmatches{$arch}};
+ }
+ if (!@archfiles) {
+ tlwarn("binpattern without hit: ".$self->name.": $arch: $p\n");
+ }
+ $tlp->add_binfiles($arch,@archfiles);
}
}
foreach my $p (@allnegpats) {
@@ -318,7 +339,14 @@ sub make_tlpobj
my %archmatches = %$matchref;
my @archs = $tltree->architectures;
foreach my $arch (@archs) {
- $tlp->remove_binfiles($arch,@{$archmatches{$arch}});
+ my @archfiles = ();
+ if (defined($archmatches{$arch})) {
+ @archfiles = @{$archmatches{$arch}};
+ }
+ if (!@archfiles) {
+ tlwarn("binpattern without hit: ".$self->name.": $arch: $p\n");
+ }
+ $tlp->remove_binfiles($arch,@archfiles);
}
}
# add the revision number of the .tlpsrc file to the compute list:
@@ -330,8 +358,16 @@ sub make_tlpobj
sub _do_normal_pattern {
my ($self,$p,$tlp,$tltree,$type,$negative) = @_;
+ my $is_default_pattern = 0;
+ if ($p =~ m/^\*/) {
+ $is_default_pattern = 1;
+ $p =~ s/^\*//;
+ }
my $matchref = $tltree->get_matching_files($type,$p);
my @matchfiles = @$matchref;
+ if (!$is_default_pattern && !@matchfiles && ($p !~ m/^f ignore/)) {
+ tlwarn("pattern without hit: ".$self->name.": $p\n");
+ }
if (defined($negative) && $negative == 1) {
$tlp->remove_files($type,@matchfiles);
} else {