diff options
author | Norbert Preining <preining@logic.at> | 2008-05-29 11:08:56 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-29 11:08:56 +0000 |
commit | 91023971d5357e16279b558392c4aaf89d6b1071 (patch) | |
tree | 9da75e16d0b4673c7b0e6ebaa5c633221b82d456 /Master/tlpkg/TeXLive | |
parent | 8044b555b3443b7028ba126d1a7277602b41f516 (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/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 21 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLTREE.pm | 11 |
2 files changed, 32 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'} } = @_ } |