summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-09-09 10:26:56 +0000
committerNorbert Preining <preining@logic.at>2008-09-09 10:26:56 +0000
commit2a4b2ba670f77b942e2a556a6800bb7d13a3ff34 (patch)
treebb5225a69e0da29c34340b33a76b56b9f3f5987e
parent2f5e8f72c6769dfb42e9dbe4759b5666e8b97c53 (diff)
update and simplify the generalize revision patch (no source anymore)
git-svn-id: svn://tug.org/texlive/trunk@10513 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/etc/generalize-revisions.diff138
1 files changed, 55 insertions, 83 deletions
diff --git a/Master/tlpkg/etc/generalize-revisions.diff b/Master/tlpkg/etc/generalize-revisions.diff
index 50e01fa2ad3..34db3cb6a20 100644
--- a/Master/tlpkg/etc/generalize-revisions.diff
+++ b/Master/tlpkg/etc/generalize-revisions.diff
@@ -1,6 +1,50 @@
+Index: texmf/scripts/texlive/tlmgr.pl
+===================================================================
+--- texmf/scripts/texlive/tlmgr.pl (revision 10512)
++++ texmf/scripts/texlive/tlmgr.pl (working copy)
+@@ -661,7 +661,7 @@
+ next;
+ }
+ my $mediarev = $mediatlp->revision;
+- if ($rev < $mediarev) {
++ if (revless ($rev, $mediarev)) {
+ $nrupdated++;
+ if ($opt_list) {
+ print "$pkg: local: $rev, source: $mediarev\n";
+@@ -740,7 +740,7 @@
+ print "update: $pkg done\n";
+ }
+ }
+- } elsif ($rev > $mediarev) {
++ } elsif (revless ($mediarev, $rev)) {
+ print "$pkg: revision in $location is less then local revision, not updating!\n";
+ next;
+ }
+Index: texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl
+===================================================================
+--- texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl (revision 10512)
++++ texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl (working copy)
+@@ -26,7 +26,7 @@
+ use TeXLive::TLMedia;
+ use TeXLive::TLPDB;
+ use TeXLive::TLConfig;
+-use TeXLive::TLUtils qw(setup_programs platform_desc win32);
++use TeXLive::TLUtils qw(setup_programs platform_desc win32 revless);
+ use Getopt::Long qw(:config no_autoabbrev require_order);
+
+ use Tk;
+@@ -583,7 +583,7 @@
+ } else {
+ $urev = 0;
+ }
+- if ($urev > $lrev) {
++ if (revless ($lrev, $urev)) {
+ if ($lp =~ m/\./) {
+ push @archret, $lp;
+ } else {
Index: tlpkg/TeXLive/TLUtils.pm
===================================================================
---- tlpkg/TeXLive/TLUtils.pm (revision 10402)
+--- tlpkg/TeXLive/TLUtils.pm (revision 10512)
+++ tlpkg/TeXLive/TLUtils.pm (working copy)
@@ -66,6 +66,7 @@
TeXLive::TLUtils::conv_to_win_path($path);
@@ -10,18 +54,19 @@ Index: tlpkg/TeXLive/TLUtils.pm
=head1 DESCRIPTION
-@@ -115,8 +116,9 @@
+@@ -115,9 +116,10 @@
&welcome_paths
&give_ctan_mirror
&tlmd5
+ &revless
);
-- @EXPORT = qw(setup_programs download_file info log debug ddebug tlwarn process_logging_options win32);
-+ @EXPORT = qw(setup_programs download_file info log debug ddebug tlwarn process_logging_options win32 revless);
+ @EXPORT = qw(setup_programs download_file info log debug ddebug tlwarn
+- process_logging_options win32);
++ process_logging_options win32 revless);
}
-@@ -1691,6 +1693,49 @@
+@@ -1692,6 +1694,34 @@
}
}
@@ -37,95 +82,22 @@ Index: tlpkg/TeXLive/TLUtils.pm
+sub revless {
+ my ($a, $b) = @_;
+ # format of a revision number:
-+ # [source:]NNNN[.RRRR]
-+ # where source is an optional source, the default is "texlive" which
-+ # is the main source. But there can be other sources, too.
++ # NNNN[.RRRR]
+ # NNNN and RRRR are integers (variable number of digits, but at least one
+ # for NNNN)
+ #
-+ my (undef, $asource, $arev, undef, $arrr) = ($a =~ m/^((.*):)?([0-9]+)(\.([0-9]+))?$/);
-+ my (undef, $bsource, $brev, undef, $brrr) = ($b =~ m/^((.*):)?([0-9]+)(\.([0-9]+))?$/);
-+ # default source is texlive
-+ $asource || ($asource = "texlive");
-+ $bsource || ($bsource = "texlive");
++ my ($arev, undef, $arrr) = ($a =~ m/^([0-9]+)(\.([0-9]+))?$/);
++ my ($brev, undef, $brrr) = ($b =~ m/^([0-9]+)(\.([0-9]+))?$/);
+ $arrr || ($arrr = 0);
+ $brrr || ($brrr = 0);
-+ # now everything should be defined
-+ # if aNNNN < bNNNN return true
+ return 1 if ($arev < $brev);
+ return 0 if ($arev > $brev);
+ # so now $arev == $brev
+ return 1 if ($arrr < $brrr);
-+ return 0 if ($arrr > $brrr);
-+ # so now $arrr == $brrr
-+ # if also the sources are the same return false
-+ return 0 if ($asource eq $bsource);
-+ # the only distinction is made via the source. Here "texlive" is always
-+ # "bigger" than anything else
-+ # since we know that the sources are different
-+ return 1 if ($bsource eq "texlive");
-+ # ok, last case is just ordered alphabetically
-+ return ($asource lt $bsource);
++ # in all other cases return 0
++ return 0;
+}
+
#############################################
#
# Taken from Text::ParseWords
-Index: texmf/scripts/texlive/tlmgr.pl
-===================================================================
---- texmf/scripts/texlive/tlmgr.pl (revision 10402)
-+++ texmf/scripts/texlive/tlmgr.pl (working copy)
-@@ -636,11 +636,11 @@
- my $rev = $tlp->revision;
- my $mediatlp = $mediatlpdb->get_package($pkg);
- if (!defined($mediatlp)) {
-- print "$pkg cannot be found in $location\n";
-+ debug("$pkg cannot be found in $location\n");
- next;
- }
- my $mediarev = $mediatlp->revision;
-- if ($rev < $mediarev) {
-+ if (revless($rev,$mediarev)) {
- $nrupdated++;
- if ($opt_list) {
- print "$pkg: local: $rev, source: $mediarev\n";
-@@ -719,7 +719,7 @@
- print "update: $pkg done\n";
- }
- }
-- } elsif ($rev > $mediarev) {
-+ } elsif (revless( $mediarev, $rev )) {
- print "$pkg: revision in $location is less then local revision, not updating!\n";
- next;
- }
-Index: texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl
-===================================================================
---- texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl (revision 10402)
-+++ texmf/scripts/texlive/tlmgrgui/tlmgrgui-real.pl (working copy)
-@@ -26,7 +26,7 @@
- use TeXLive::TLMedia;
- use TeXLive::TLPDB;
- use TeXLive::TLConfig;
--use TeXLive::TLUtils qw(setup_programs platform_desc win32);
-+use TeXLive::TLUtils qw(setup_programs platform_desc win32 revless);
- use Getopt::Long qw(:config no_autoabbrev require_order);
-
- use Tk;
-@@ -116,7 +116,7 @@
- loadremotetlpdbwait => "Loading remote TeX Live Database\nThis may take some time, please wait!",
- runupdater => "Some package cannot be updated using the GUI!\nPlease run TEXROOT/tlpkg/installer/updater.bat once,\notherwise the updates will not be complete!\nNOTE: You have to QUIT this program first!",
- actions => "Actions",
-- reinitlsr => "Re-initalise file database",
-+ reinitlsr => "Re-initialise file database",
- recreateformats => "Re-create all formats",
- updatemaps => "Update font map database",
- warningnonetupdate => "No updates found.\n\nYour installation is set up to look on the disk for updates.\n\nIf you want to install from the Internet for this one time only, click on the \"Change\" button above and select \"Default Net Location\" (or any other network location you know to be working).\n\nIf you want to change it permanently, go to the \"Configuration\" Tab and change the default installation source.",
-@@ -583,7 +583,7 @@
- } else {
- $urev = 0;
- }
-- if ($urev > $lrev) {
-+ if (revless($lrev, $urev)) {
- if ($lp =~ m/\./) {
- push @archret, $lp;
- } else {