summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-05-29 11:08:56 +0000
committerNorbert Preining <preining@logic.at>2008-05-29 11:08:56 +0000
commit91023971d5357e16279b558392c4aaf89d6b1071 (patch)
tree9da75e16d0b4673c7b0e6ebaa5c633221b82d456 /Master/tlpkg
parent8044b555b3443b7028ba126d1a7277602b41f516 (diff)
save the current maximum revision of the repo in 00texlive.config at
tlpdb generation time git-svn-id: svn://tug.org/texlive/trunk@8404 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rw-r--r--Master/tlpkg/TeXLive/TLPDB.pm21
-rw-r--r--Master/tlpkg/TeXLive/TLTREE.pm11
-rwxr-xr-xMaster/tlpkg/bin/tlpsrc2tlpdb5
3 files changed, 37 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm
index 690f8d24463..ec01d858bb2 100644
--- a/Master/tlpkg/TeXLive/TLPDB.pm
+++ b/Master/tlpkg/TeXLive/TLPDB.pm
@@ -44,6 +44,7 @@ C<TeXLive::TLPDB> -- A database of TeX Live Packages
$tlpdb->config_doc_container;
$tlpdb->config_container_format;
$tlpdb->config_release;
+ $tlpdb->config_revision;
TeXLive::TLPDB->listdir([$dir]);
$tlpdb->generate_listfiles([$destdir]);
@@ -761,6 +762,26 @@ sub config_release {
=pod
+=item C<< $tlpdb->config_revision >>
+
+Returns the currently set revision. See Options below.
+
+=cut
+
+sub config_revision {
+ my $self = shift;
+ if (defined($self->{'tlps'}{'00texlive.config'})) {
+ foreach my $d ($self->{'tlps'}{'00texlive.config'}->depends) {
+ if ($d =~ m!^revision/(.*)$!) {
+ return "$1";
+ }
+ }
+ }
+ return "";
+}
+
+=pod
+
=item C<< $tlpdb->option_XXXXX >>
Need to be documented
diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm
index e32b3a91e13..310dd56e627 100644
--- a/Master/tlpkg/TeXLive/TLTREE.pm
+++ b/Master/tlpkg/TeXLive/TLTREE.pm
@@ -15,6 +15,7 @@ sub new {
my $self = {
svnroot => $params{'svnroot'},
archs => $params{'archs'},
+ revision => $params{'revision'},
# private stuff
_allfiles => {},
_dirtree => {},
@@ -30,6 +31,7 @@ sub init_from_svn {
my $self = shift;
die("Undefined svn root!") if (!defined($self->{'svnroot'}));
my @lines = `cd $self->{'svnroot'} && svn status -v`;
+ $self->{'revision'} = `svnversion -n`;
$self->_initialize_lines(@lines);
}
@@ -39,6 +41,7 @@ sub init_from_statusfile {
open(TMP,"<$_[0]") || die("Cannot open svn status file: $_[0]");
my @lines = <TMP>;
close(TMP);
+ $self->{'revision'} = `svnversion -n`;
$self->_initialize_lines(@lines);
}
sub init_from_files {
@@ -46,6 +49,7 @@ sub init_from_files {
my $svnroot = $self->{'svnroot'};
my @lines = `find $svnroot ! -wholename '*/.svn*'`;
@lines = map { s@^$svnroot@@; s@^/@@; " 1 1 dummy $_" } @lines;
+ $self->{'revision'} = 1;
$self->_initialize_lines(@lines);
}
@@ -327,6 +331,13 @@ sub svnroot {
return $self->{'svnroot'};
}
+sub revision {
+ my $self = shift;
+ if (@_) { $self->{'revision'} = shift };
+ return $self->{'revision'};
+}
+
+
sub architectures {
my $self = shift;
if (@_) { @{ $self->{'archs'} } = @_ }
diff --git a/Master/tlpkg/bin/tlpsrc2tlpdb b/Master/tlpkg/bin/tlpsrc2tlpdb
index 37ae0be378c..4b67856f0b0 100755
--- a/Master/tlpkg/bin/tlpsrc2tlpdb
+++ b/Master/tlpkg/bin/tlpsrc2tlpdb
@@ -103,6 +103,11 @@ sub main
}
}
}
+ if ($tlp->name eq "00texlive.config") {
+ my @bar = $tlp->depends;
+ push @bar, "revision/".$tltree->revision;
+ $tlp->depends(@bar);
+ }
$tldb->add_tlpobj ($tlp);
}
warn "\n";