summaryrefslogtreecommitdiff
path: root/Master/tlpkg/etc
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2009-05-21 12:20:41 +0000
committerNorbert Preining <preining@logic.at>2009-05-21 12:20:41 +0000
commit8490a0b9eec120716aecad72a77cdf753b0918b0 (patch)
tree2c954d7756939614a22623fc7bf31c17a6bfd3c4 /Master/tlpkg/etc
parent99998273520f5945137ac6c9f78ebb7a9da91714 (diff)
add patch to support more autopatterns, but I am not sure if we want that
git-svn-id: svn://tug.org/texlive/trunk@13294 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/etc')
-rw-r--r--Master/tlpkg/etc/dev.more-autopatterns-for-binfiles.patch81
1 files changed, 81 insertions, 0 deletions
diff --git a/Master/tlpkg/etc/dev.more-autopatterns-for-binfiles.patch b/Master/tlpkg/etc/dev.more-autopatterns-for-binfiles.patch
new file mode 100644
index 00000000000..760a2fa55da
--- /dev/null
+++ b/Master/tlpkg/etc/dev.more-autopatterns-for-binfiles.patch
@@ -0,0 +1,81 @@
+Index: TLPSRC.pm
+===================================================================
+--- TLPSRC.pm (revision 13292)
++++ TLPSRC.pm (working copy)
+@@ -313,6 +313,7 @@
+ foreach my $p (@allpospats) {
+ my @todoarchs = $tltree->architectures;
+ my $finalp = $p;
++ my $is_default_pattern = 0;
+ if ($p =~ m%^(\w+)/(!?[-_a-z0-9,]+)\s+(.*)$%) {
+ my $pt = $1;
+ my $aa = $2;
+@@ -340,21 +341,37 @@
+ if ($finalp =~ m! bin/win32/!) {
+ @todoarchs = qw/win32/;
+ }
++ # remove initial * if it is a default pattern since we call
++ # get_matching files directly
++ if ($finalp =~ m/^\*/) {
++ $is_default_pattern = 1;
++ $finalp =~ s/^\*//;
++ }
+ # now @todoarchs contains only those archs for which we want
+ # to match the pattern
+ foreach my $arch (@todoarchs) {
+ # get only those files matching the pattern
+ my @archfiles = $tltree->get_matching_files('bin',$finalp, $arch);
+ if (!@archfiles) {
+- if (($arch ne "win32") || defined($::tlpsrc_pattern_warn_win)) {
++ if (!$is_default_pattern &&
++ ( ($arch ne "win32") || defined($::tlpsrc_pattern_warn_win))) {
+ tlwarn("$self->{name} ($arch): no hit on binpattern $finalp\n");
+ }
++ if (!$is_default_pattern) {
++ # for actual bin patterns we add empty binfiles to generate
++ # the probably empty .ARCH packages
++ $tlp->add_binfiles($arch,@archfiles);
++ }
++ } else {
++ # do call that if there are really only binfiles available,
++ # otherwise we end up with .ARCH packages for *each* package
++ $tlp->add_binfiles($arch,@archfiles);
+ }
+- $tlp->add_binfiles($arch,@archfiles);
+ }
+ }
+ foreach my $p (@allnegpats) {
+ my @todoarchs = $tltree->architectures;
++ my $is_default_pattern = 0;
+ my $finalp = $p;
+ if ($p =~ m%^(\w+)/(!?[-_a-z0-9,]+)\s+(.*)$%) {
+ my $pt = $1;
+@@ -377,6 +394,12 @@
+ # set $p to the pattern without arch specification
+ $finalp = "$pt $pr";
+ }
++ # remove initial * if it is a default pattern since we call
++ # get_matching files directly
++ if ($finalp =~ m/^\*/) {
++ $is_default_pattern = 1;
++ $finalp =~ s/^\*//;
++ }
+ # now @todoarchs contains only those archs for which we want
+ # to match the pattern
+ foreach my $arch (@todoarchs) {
+@@ -387,8 +410,14 @@
+ tlwarn("$self->{name} ($arch): no hit on negative binpattern $finalp\n")
+ unless defined($::tlpsrc_pattern_no_warn_negative);
+ }
++ if (!$is_default_pattern) {
++ # for actual bin patterns we add empty binfiles to generate
++ # the probably empty .ARCH packages
++ $tlp->add_binfiles($arch,@archfiles);
++ }
++ } else {
++ $tlp->remove_binfiles($arch,@archfiles);
+ }
+- $tlp->remove_binfiles($arch,@archfiles);
+ }
+ }
+ # add the revision number of the .tlpsrc file to the compute list: