diff options
author | Norbert Preining <preining@logic.at> | 2007-11-03 17:41:13 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2007-11-03 17:41:13 +0000 |
commit | 8b5cc434c2b2ec5ec62ceaf74c0055c605a92bb6 (patch) | |
tree | 9373f5e38fe0e2c1d0b90056fc06e465a2bcc755 /Master/tlpkg/TeXLive/TLTREE.pm | |
parent | 6c46afe40ce5ca5d7184e5f55a00dc2371ae77d3 (diff) |
add TLPDB->available_architectures
git-svn-id: svn://tug.org/texlive/trunk@5327 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLTREE.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLTREE.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLTREE.pm b/Master/tlpkg/TeXLive/TLTREE.pm index 01c56cdfa25..652894ef06b 100644 --- a/Master/tlpkg/TeXLive/TLTREE.pm +++ b/Master/tlpkg/TeXLive/TLTREE.pm @@ -18,6 +18,7 @@ sub new { my %params = @_; my $self = { svnroot => $params{'svnroot'}, + archs => $params{'archs'}, # private stuff _allfiles => {}, _dirtree => {}, @@ -55,6 +56,7 @@ sub init_from_files { sub _initialize_lines { my $self = shift; my @lines = @_; + my %archs; # we first chdir to the svn root, we need it for file tests my $oldpwd = `pwd`; chomp($oldpwd); @@ -66,6 +68,10 @@ sub _initialize_lines { my $lastchanged = ($8 eq "?" ? 1 : $8); my $entry = "$10"; next if -d $entry; # TODO: what to do with links??? + # collect architectures + if ($entry =~ m,Master/bin/(.*)/tex.*$,) { + $archs{$1} = 1; + } $self->{'_allfiles'}{$entry}{'lastchangedrev'} = $lastchanged; $self->{'_allfiles'}{$entry}{'size'} = (lstat $entry)[7]; my $fn = TeXLive::TLUtils::basename($entry); @@ -77,6 +83,8 @@ sub _initialize_lines { #die("Cannot read svn status output line:\n $l\n"); } } + # save list of architectures + $self->archs(keys(%archs)); # now do some magic # - create list of top level dirs with a list of full path names of # the respective dir attached @@ -311,6 +319,12 @@ sub architectures { if (@_) { @Architectures = @_ } return @Architectures; } +sub archs { + my $self = shift; + if (@_) { @{ $self->{'archs'} } = @_ } + return @{ $self->{'archs'} }; +} + 1; |