From 8490a0b9eec120716aecad72a77cdf753b0918b0 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 21 May 2009 12:20:41 +0000 Subject: 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 --- .../etc/dev.more-autopatterns-for-binfiles.patch | 81 ++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 Master/tlpkg/etc/dev.more-autopatterns-for-binfiles.patch (limited to 'Master/tlpkg/etc') 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: -- cgit v1.2.3