From 8b5cc434c2b2ec5ec62ceaf74c0055c605a92bb6 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 3 Nov 2007 17:41:13 +0000 Subject: add TLPDB->available_architectures git-svn-id: svn://tug.org/texlive/trunk@5327 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLTREE.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Master/tlpkg/TeXLive/TLTREE.pm') 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; -- cgit v1.2.3