summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-12-22 16:18:16 +0000
committerNorbert Preining <preining@logic.at>2008-12-22 16:18:16 +0000
commit3995a49d727b2549ec704cd87260700125fab82d (patch)
tree9ed1b08ef61e743036435f1081d076869fe2b2db
parent03f6232274f28a4c575eb53b46f714dc5aaed402 (diff)
move the wrong lines to below the header
git-svn-id: svn://tug.org/texlive/trunk@11682 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr2.pl21
1 files changed, 17 insertions, 4 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr2.pl b/Master/texmf/scripts/texlive/tlmgr2.pl
index 0cf6071bdd6..47e5ad8eadd 100755
--- a/Master/texmf/scripts/texlive/tlmgr2.pl
+++ b/Master/texmf/scripts/texlive/tlmgr2.pl
@@ -1259,11 +1259,19 @@ sub close_w32_updater {
# anymore. That has all to be done by hand.
#
sub machine_line {
+ my ($flag) = @_;
+ my $ret = 0;
+ if ($flag eq "-ret") {
+ $ret = 1;
+ shift;
+ }
my ($pkg, $flag, $lrev, $rrev, @args) = @_;
$lrev || ($lrev = "-");
$rrev || ($rrev = "-");
$flag || ($flag = "?");
- print "$pkg\t$flag\t$lrev\t$rrev\t", join("\t",@args), "\n";
+ my $str = "$pkg\t$flag\t$lrev\t$rrev\t" . join("\t",@args) . "\n";
+ return($str) if $ret;
+ print $str;
}
sub action_update {
@@ -1462,6 +1470,7 @@ sub action_update {
# we first collect the list of packages to be actually updated or installed
my @updated;
my @new;
+ my @addlines;
foreach my $pkg (sort @todo) {
next if ($pkg =~ m/^00texlive/);
@@ -1480,7 +1489,8 @@ sub action_update {
if ($forcerm_coll) {
if ($::machinereadable) {
# TODO should we add a revision number
- machine_line($pkg, $FLAG_FORCIBLE_REMOVED, "-", "-");
+ push @addlines,
+ machine_line("-ret", $pkg, $FLAG_FORCIBLE_REMOVED, "-", "-");
} else {
info("skipping forcibly removed package $pkg\n");
}
@@ -1514,10 +1524,10 @@ sub action_update {
my $mediarev = $mediatlp->revision;
if ($rev < $mediarev) {
push @updated, $pkg;
- # machine_line($pkg, $FLAG_UPDATE, $rev, $mediarev);
} elsif ($rev > $mediarev) {
if ($::machinereadable) {
- machine_line($pkg, $FLAG_REVERSED_UPDATE, $rev, $mediarev);
+ push @addlines,
+ machine_line("-ret", $pkg, $FLAG_REVERSED_UPDATE, $rev, $mediarev);
} else {
info("$pkg: local revision ($rev) is newer than revision in $location"
. " ($mediarev), not updating.\n");
@@ -1543,6 +1553,9 @@ sub action_update {
print "total-bytes\t$sizes{'__TOTAL__'}\n" if $::machinereadable;
print "end-of-header\n" if $::machinereadable;
+ # print out deferred machine readable lines after the header
+ for (@addlines) { print; }
+
#
# we have to remove all the stuff before we install other packages
# to support moving of files from one package to another.