summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-11-07 08:20:36 +0000
committerNorbert Preining <preining@logic.at>2007-11-07 08:20:36 +0000
commit1c52ac9208bfcce5ea0e8979609988897125a729 (patch)
tree607db9a8356a4bae11d67c4f2ffa6b2565bde4e9 /Master/tlpkg
parent6879fd6def0bca8ba3a8b9786ee987af47c7b2ab (diff)
- add an optional argument to TLPOBJ->recompute_revision which is an additional
number to be taken into account - add the revision number of the tlpsrc files of collections/schemes to the make_tlpobj function call to tlp->recompute_revision Thus, collections and schemes should not have revision 0 any more git-svn-id: svn://tug.org/texlive/trunk@5388 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLPOBJ.pm11
-rw-r--r--Master/tlpkg/TeXLive/TLPSRC.pm9
2 files changed, 17 insertions, 3 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm
index dcd22ff99eb..cdaa93b2db2 100644
--- a/Master/tlpkg/TeXLive/TLPOBJ.pm
+++ b/Master/tlpkg/TeXLive/TLPOBJ.pm
@@ -199,13 +199,16 @@ sub from_fh {
}
sub recompute_revision {
- my ($self,$tltree) = @_;
+ my ($self,$tltree, $revtlpsrc) = @_;
my @files = $self->all_files;
my $filemax = 0;
foreach my $f (@files) {
$filemax = $tltree->file_svn_lastrevision($f);
$self->revision(($filemax > $self->revision) ? $filemax : $self->revision);
}
+ if (defined($revtlpsrc)) {
+ $self->revision( $filemax > $revtlpsrc ? $filemax : $revtlpsrc );
+ }
}
sub recompute_sizes {
@@ -930,9 +933,13 @@ which the files should be taken.
recomputes the sizes based on the information present in C<$tltree>.
-=item C<recompute_revision($tltree)>
+=item C<recompute_revision($tltree [, $revtlpsrc ])>
recomputes the revision based on the information present in C<$tltree>.
+The optional argument C<$rectlpsrc> can be an additional revision number
+which is taken into account. C<$tlpsrc->make_tlpobj> adds the revision
+number of the C<tlpsrc> file here so that collections (which do not
+contain files) also have revision number.
=item C<update_from_catalogue($texcatalogue)>
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm
index f1afcbdc550..030846abe6e 100644
--- a/Master/tlpkg/TeXLive/TLPSRC.pm
+++ b/Master/tlpkg/TeXLive/TLPSRC.pm
@@ -317,8 +317,15 @@ sub make_tlpobj
$tlp->remove_binfiles($arch,@{$archmatches{$arch}});
}
}
+ # for collections and schemes we add the revision number of the .tlpsrc
+ # file to the compute list:
+ my $addnr = 0;
+ if (($self->category eq "Collection") || ($self->category eq "Scheme")) {
+ my $fn = "tlpk/tlpsrc/" . $self->name . ".tlpsrc";
+ $addnr = $tltree->file_svn_lastrevision($fn);
+ }
+ $tlp->recompute_revision($tltree, $addnr);
$tlp->recompute_sizes($tltree);
- $tlp->recompute_revision($tltree);
return $tlp;
}