diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2007-11-05 00:53:29 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2007-11-05 00:53:29 +0000 |
commit | 72576dcfe456f34434be26c0893dd8b87d40e38b (patch) | |
tree | 7abd2f334340941edc8c7344997ec9d2ef5d2788 | |
parent | 5ab4e5094615179493741c7a1cec617193408724 (diff) |
TLUtils.pm: fixed $0 for Windows and architectures stuff.
install-tl.pl: Menus, platform detection, dependencies...
git-svn-id: svn://tug.org/texlive/trunk@5349 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Master/install-tl.pl | 330 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 86 |
2 files changed, 236 insertions, 180 deletions
diff --git a/Master/install-tl.pl b/Master/install-tl.pl index 3048bb5d3de..9d5e92bbdcf 100755 --- a/Master/install-tl.pl +++ b/Master/install-tl.pl @@ -11,17 +11,18 @@ $texlive_release="2007"; BEGIN { $^W = 1; - ($thisdir=$0)=~s/(.*)\/.*/$1/; + my $me=$0; + $me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i; + ($thisdir=$me)=~s!(.*)/.*$!$1!; unshift (@INC, "$thisdir/tlpkg"); } use TeXLive::TLUtils qw(initialize_installer media platform platform_desc - which getenv win32 unix program_exists binaries_available_from_disk - binaries_available_from_net get_system_tmpdir); + which getenv win32 unix program_exists architectures_available + additional_architectures_available_from_net get_system_tmpdir member); use TeXLive::TLPOBJ; use TeXLive::TLPDB; - $default_scheme='scheme-full'; ###$texlive_url='http://localhost/texlive/Contents/inst'; @@ -56,29 +57,24 @@ sub dump_vars { } -# Determine which platforms are supported. This code should be -# revised later. +# Determine which platforms are supported. $trynet=0; sub set_platforms_supported { - if (media=~/(CD|DVD)/) { - my @binaries=binaries_available_from_disk; - for my $binary (@binaries) { - unless (defined $vars{"diskbin_$binary"}) { - $vars{"diskbin_$binary"}=0; - } + my @binaries=architectures_available; + for my $binary (@binaries) { + unless (defined $vars{"diskbin_$binary"}) { + $vars{"diskbin_$binary"}=0; } } - if (media eq 'NET' or $trynet==1) { - print "\nLoading '$texlive_url/texlive.tlpdb' ...\n"; - my @binaries=binaries_available_from_net; + if ($trynet==1) { + my @binaries=additional_architectures_available_from_net \%vars; for my $binary (@binaries) { - unless (defined $vars{"diskbin_$binary"}) { - $vars{"netbin_$binary"}=0; - } + $vars{"netbin_$binary"}=0; } } } + # Environment variables and default values on UNIX: # TEXLIVE_INSTALL_PREFIX /usr/local/texlive => $tex_prefix # TEXLIVE_INSTALL_TEXDIR $tex_prefix/2007 => $TEXDIR @@ -129,14 +125,12 @@ sub set_texlive_default_dirs { 'n_collections_selected' => 0, 'n_collections_available' => 0, 'total_size' => 0, - 'o_altfontdir' => 0, - 'altfontdir' => "$system_tmpdir/texfonts", - 'o_symlinks' => 0, + 'option_symlinks' => 0, 'sys_bin' => '/usr/local/bin', 'sys_man' => '/usr/local/man', 'sys_info' => '/usr/local/info', - 'o_doc' => 1, - 'o_src' => 1, + 'option_doc' => 1, + 'option_src' => 1, 'selected_scheme' => $default_scheme, ); @@ -178,6 +172,8 @@ sub other_options { my %opts=( '-' => 'deselect all', '+' => 'select all', + 'H' => 'help', + 'I' => 'start installation', 'N' => 'add binaries from net', 'R' => 'return to main menu', 'Q' => 'quit' @@ -233,7 +229,7 @@ sub initialize_collections { my $scheme_tlpobj = $tlpdb->get_package($default_scheme); if (defined ($scheme_tlpobj)) { foreach my $dependent ($scheme_tlpobj->depends) { - if ($dependent=~/.*(collection-.*)/) { + if ($dependent=~/^(collection-.*)/) { $vars{"$1"}=1; } } @@ -241,40 +237,51 @@ sub initialize_collections { } } -# If we are on the CD and we want to download binaries for additional -# platforms, we need a second database which provides information -# about binary systems which can be downloaded from net but are not on -# the DVD, at least if we decide to support this. -#sub load_tlpdb_net { -# my $database; -# $database='http://www.tug.org/svn/texlive/trunk/Master/texlive.tlpdb'; -# $::tlpdb_net=TeXLive::TLPDB->new(location => "$database"); -#} +sub set_install_platform { + my @available_platforms; + my $detected_platform=platform; + my $warn_nobin; + my $warn_nobin_x86_64_linux; + my $nowarn=""; + my $wp='##'; # warning prefix + + $warn_nobin="\n$wp WARNING! No binaries for your platform found! "; + if (media eq 'CD') { + $warn_nobin.="More binaries are available\n$wp on the DVD. The binary " + . "systems menu allows you to download extra binaries\n" + . "$wp from the network.\n"; + } + $warn_nobin_x86_64_linux="$warn_nobin" . + "$wp No binaries for x86_64-linux found, using i386-linux instead.\n"; + + if (defined $vars{"diskbin_$detected_platform"}) { + $vars{"diskbin_$detected_platform"}=1; + $vars{'inst_platform'}=$detected_platform; + return $nowarn; + } elsif (defined $vars{"netbin_$detected_platform"}) { + $vars{"netbin_$detected_platform"}=1; + $vars{'inst_platform'}=$detected_platform; + return $nowarn; + } elsif ($detected_platform eq 'x86_64-linux') { + $vars{'diskbin_i386-linux'}=1; + $vars{'inst_platform'}='i386-linux'; + return $warn_nobin_x86_64_linux; + } else { + return $warn_nobin; + } +} # The menu loop. A menu is a function. Its return value is a # reference to another menu or to itself. sub run_menu { my $menu=\&main_menu; - while (1) { + while ($menu!=\&install) { $menu=$menu->(); } } -# Not yet implemented. Will probably go away. -sub platform_menu { - my %command=( - 'self' => \&platform_menu, - 'R' => \&main_menu, - 'Q' => \&quit - ); - print "<<<<< PLATFORM MENU >>>>>>\n"; - - return $command{'R'}->(); -} - - sub binary_menu { my %command=( 'self' => \&binary_menu, @@ -305,6 +312,8 @@ sub binary_menu { } my @binaries=sort(@diskbins,@netbins); + set_install_platform; + $vars{'n_systems_available'}=0; for my $key (keys %vars) { ++$vars{'n_systems_available'} if ($key=~/^(disk|net)bin/); @@ -384,7 +393,6 @@ sub scheme_menu { my @keys=string_to_list "abcdefghijklmnopstuvwxyz"; my %keyval; my $index=0; - menu_head 'Select a scheme:'; @@ -414,7 +422,7 @@ sub scheme_menu { my $scheme_tlpobj = $tlpdb->get_package($vars{'selected_scheme'}); if (defined ($scheme_tlpobj)) { foreach my $dependent ($scheme_tlpobj->depends) { - if ($dependent=~/.*(collection-.*)/) { + if ($dependent=~/^(collection-.*)/) { $vars{"$1"}=1; } } @@ -446,40 +454,54 @@ sub collection_menu { my @keys=string_to_list "abcdefghijklmnopstuvwxyzABCDEFGHIJKLMNOPSTUVWXYZ"; my %keyval; my $index=0; + my @coll_short_desc; + my @coll_long_desc; menu_head 'Select collections:'; @collections=sort @collections_std; + foreach my $collection (@collections) { + my $tlpobj = $tlpdb->get_package("$collection"); + if (length $tlpobj->shortdesc>30) { + push @coll_long_desc, $collection; + } else { + push @coll_short_desc, $collection; + } + } + my $singlecolumn_index=@coll_short_desc-1; + ##<cols=2> - my $lines=@collections/2; - ++$lines if (@collections%2); - for my $index (0..$lines-1) { - my $collection=$collections[$index]; + my $lines=@coll_short_desc/2; + ++$lines if (@coll_short_desc%2); + for (0..$lines-1) { + $index=$_; + my $collection=$coll_short_desc[$index]; my $tlpobj = $tlpdb->get_package("$collection"); $keyval{$keys[$index]}="$collection"; printf " %s %s %-33s", $keys[$index], button($vars{"$collection"}), substr($tlpobj->shortdesc,0,33); - if (defined $collections[$index+$lines]) { - my $collection=$collections[$index+$lines]; - my $tlpobj = $tlpdb->get_package("$collection"); + if (defined $coll_short_desc[$index+$lines]) { + my $collection=$coll_short_desc[$index+$lines]; + my $tlpobj=$tlpdb->get_package("$collection"); $keyval{$keys[$index+$lines]}="$collection"; - printf " %s %s %-33s\n", $keys[$index+$lines], - button($vars{"$collection"}), substr($tlpobj->shortdesc,0,33); + printf " %s %s %-32s\n", $keys[$index+$lines], + button($vars{"$collection"}), substr($tlpobj->shortdesc,0,32); } else { print "\n"; } + } ##</cols=2> - -##<cols=1> -# foreach my $collection (@collections) { -# my $tlpobj = $tlpdb->get_package("$collection"); -# $keyval{$keys[$index]}="$collection"; -# printf " %s %s %s\n", $keys[$index], button($vars{"$collection"}), -# $tlpobj->shortdesc; -# ++$index; -##</cols=1> + $index=$singlecolumn_index; +# print "\n$index\n\n"; + foreach my $collection (@coll_long_desc) { + my $tlpobj=$tlpdb->get_package("$collection"); + $keyval{$keys[$index+1]}="$collection"; + printf " %s %s %s\n", $keys[$index+1], button($vars{"$collection"}), + $tlpobj->shortdesc; + ++$index; } +##</cols=1> other_options qw(- + R Q); my $answer=prompt 'Press key to select collections'; @@ -530,7 +552,6 @@ sub language_menu { @languages=sort @collections_lang; @lang_docs=sort @collections_lang_doc; -##<cols=2> $lines=@languages/2; ++$lines if (@languages%2); for my $index (0..$lines-1) { @@ -548,22 +569,10 @@ sub language_menu { } else { print "\n"; } -##</cols=2> - -##<cols=1> -# foreach my $language (@languages) { -# my $tlpobj = $tlpdb->get_package("$language"); -# $keyval{$lang_keys[$lang_index]}="$language"; -# printf " %s %s %s\n", $lang_keys[$lang_index], -# button($vars{"$language"}), -# $tlpobj->shortdesc; -# ++$lang_index; -##</cols=1> } print "\nLanguage specific documentation. Select languages first.\n\n"; -##<cols=2> $lines=@lang_docs/2; ++$lines if (@lang_docs%2); for my $index (0..$lines-1) { @@ -581,17 +590,6 @@ sub language_menu { } else { print "\n"; } -##</cols=2> - -##<cols=1> -# foreach my $lang_docs (@lang_docs) { -# my $tlpobj = $tlpdb->get_package("$lang_docs"); -# $keyval{$lang_doc_keys[$lang_doc_index]}="$lang_docs"; -# printf " %s %s %s\n", $lang_doc_keys[$lang_doc_index], -# button($vars{"$lang_docs"}), -# $tlpobj->shortdesc; -# ++$lang_doc_index; -##</cols=1> } other_options qw (+ - R Q); @@ -690,20 +688,17 @@ EOF sub options_menu { - my $b_altfontdir=button($vars{'o_altfontdir'}); - my $b_symlinks=button($vars{'o_symlinks'}); - my $b_doc=button($vars{'o_doc'}); - my $b_src=button($vars{'o_src'}); + my $b_symlinks=button($vars{'option_symlinks'}); + my $b_doc=button($vars{'option_doc'}); + my $b_src=button($vars{'option_src'}); - my $altfontdir=$vars{'altfontdir'}; my $sys_bin=$vars{'sys_bin'}; my $sys_man=$vars{'sys_man'}; my $sys_info=$vars{'sys_info'}; - my $t_altfontdir=($vars{'o_altfontdir'})? $vars{'altfontdir'}:''; - my $t_sys_bin=($vars{'o_symlinks'})? $vars{'sys_bin'}:''; - my $t_sys_man=($vars{'o_symlinks'})? $vars{'sys_man'}:''; - my $t_sys_info=($vars{'o_symlinks'})? $vars{'sys_info'}:''; + my $t_sys_bin=($vars{'option_symlinks'})? $vars{'sys_bin'}:''; + my $t_sys_man=($vars{'option_symlinks'})? $vars{'sys_man'}:''; + my $t_sys_info=($vars{'option_symlinks'})? $vars{'sys_info'}:''; my %command=( 'self' => \&options_menu, @@ -714,11 +709,6 @@ sub options_menu { clear_screen; menu_head "Current options setup:"; - print <<"EOF"; - <A> alternate directory for automatically generated fonts: $b_altfontdir - directory name: $t_altfontdir -EOF -; if (unix) { print <<"EOF"; <L> create symlinks in standard directories: $b_symlinks @@ -737,19 +727,10 @@ EOF other_options qw(R Q); my $answer=prompt 'Enter command'; - if ("\u$answer" eq 'A') { - toggle 'o_altfontdir'; - if ($vars{'o_altfontdir'}) { - print "New value for alternate directory [$altfontdir]: "; - chomp($answer=<STDIN>); - $vars{'altfontdir'}="$answer" if (length $answer); - } - return $command{'self'}; - } if (unix) { if ("\u$answer" eq 'L') { - toggle 'o_symlinks'; - if ($vars{'o_symlinks'}) { + toggle 'option_symlinks'; + if ($vars{'option_symlinks'}) { print "New value for binary directory [$sys_bin]: "; chomp($answer=<STDIN>); $vars{'sys_bin'}="$answer" if (length $answer); @@ -770,11 +751,11 @@ EOF } } if ("\u$answer" eq 'S') { - toggle 'o_src'; + toggle 'option_src'; return $command{'self'}; } if ("\u$answer" eq 'D') { - toggle 'o_doc'; + toggle 'option_doc'; return $command{'self'}; } if (defined $command{"\u$answer"}) { @@ -784,9 +765,6 @@ EOF } } -sub install { - print "<<<<< install >>>>>>\n"; -} sub quit { dump_vars; @@ -796,17 +774,19 @@ sub quit { sub main_menu { my $this_platform=platform_desc($vars{'this_platform'}); - my $b_symlinks=button($vars{'o_symlinks'}); - my $b_altfontdir=button($vars{'o_altfontdir'}); - my $b_doc=button($vars{'o_doc'}); - my $b_src=button($vars{'o_src'}); - my $t_altfontdir=($vars{'o_altfontdir'})? "($vars{'altfontdir'})":''; + my $b_symlinks=button($vars{'option_symlinks'}); + my $b_doc=button($vars{'option_doc'}); + my $b_src=button($vars{'option_src'}); + + my $warn_nobin; $vars{'n_systems_available'}=0; for my $key (keys %vars) { ++$vars{'n_systems_available'} if ($key=~/^(disk|net)bin/); } + $warn_nobin=set_install_platform; + $vars{'n_systems_selected'}=0; $vars{'n_collections_selected'}=0; foreach my $key (keys %vars) { @@ -840,36 +820,38 @@ sub main_menu { =======> for commands or configurable options <======= Proposed platform: $this_platform - warn_nobin - <P> over-ride system detection and choose platform + $warn_nobin <B> binary systems: $vars{'n_systems_selected'} out of $vars{'n_systems_available'} + <S> Installation scheme ($vars{'selected_scheme'}) - [customizing installation scheme: - <C> standard collections <L> language collections] - $vars{'n_collections_selected'} out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB + + Customizing installation scheme: + <C> standard collections + <L> language collections + $vars{'n_collections_selected'} collections out of $vars{'n_collections_available'}, disk space required: $vars{'total_size'} MB + <D> directories: TEXDIR (The main TeX directory) : $vars{'TEXDIR'} TEXMFLOCAL (Directory for local styles etc): $vars{'TEXMFLOCAL'} TEXMFSYSVAR (Directory for local config) : $vars{'TEXMFSYSVAR'} + <O> options: - $b_altfontdir alternate directory for generated fonts $t_altfontdir EOF ; print <<"EOF" if (unix); $b_symlinks create symlinks in standard directories EOF ; - print <<"EOF"; +print <<"EOF"; $b_doc install macro/font doc tree $b_src install macro/font source tree - <I> start installation - <H> help, <Q> quit EOF ; - print 'Enter command: '; + other_options qw (I H Q); + my $answer=prompt 'Enter command'; - chomp(my $answer=<STDIN>); +# chomp(my $answer=<STDIN>); if (defined $command{"\u$answer"}) { return $command{"\u$answer"}; } else { @@ -878,11 +860,85 @@ EOF } +sub calc_depends { + # First look for packages in the selected scheme. + + my $scheme=$tlpdb->get_package($vars{'selected_scheme'}); + + for my $scheme_content ($scheme->depends) { + $install{"$scheme_content"}=1 unless ($scheme_content=~/^collection-/); + } + + # Now look for collections in the %vars hash. These are not + # necessarily the collections required by a scheme. The final + # decision is made in the collections/languages menu. + + my @collections; + + foreach my $key (keys %vars) { + if ($key=~/^collection-/) { + push @collections, $key if $vars{$key}; + } + } +# printf "%d collections\n", @collections+0; + + # Now we look for packages in collections. A collection can contain + # other collections. In this case we push it to the @collections + # list if it doesn't exist already. + + foreach my $selected_collection (@collections) { + my $collection=$tlpdb->get_package($selected_collection); + + for my $collection_content ($collection->depends) { + if ($collection_content=~/^collection-/) { + push @collections, $collection_content + unless member $collection_content, @collections; + } else { + $install{"$collection_content"}=1; + } + } + } +# printf "%d\n", @collections+0; +# print "---------------\n"; +# foreach my $pkg (keys %install) { +# print "Package $pkg\n"; +# } +# print "---------------\n"; +# foreach my $col (@collections) { +# print "$col\n"; +# } +} + +sub create_profile { + # The file "TLprofile" is created at the beginning of the + # installation process and contains information about the current + # setup. The purpose is to allow non-interactive installations. + open PROFILE, ">$profilepath/TLprofile"; + print PROFILE "selected_scheme $vars{selected_scheme}\n"; + foreach my $key (keys %vars) { + print PROFILE "$key $vars{$key}\n" + if $key=~/^collection/ and $vars{$key}==1; + print PROFILE "$key $vars{$key}\n" if $key=~/^option_doc/; + print PROFILE "$key $vars{$key}\n" if $key=~/^option_src/; + print PROFILE "$key $vars{$key}\n" if $key=~/^option_symlinks/; + } + close PROFILE; +} + + load_tlpdb; set_platforms_supported; set_texlive_default_dirs; initialize_collections; +set_install_platform; run_menu; +calc_depends; + + +dump_vars; +$profilepath='.'; +create_profile; +print "Profile written to $profilepath/TLprofile\n"; __END__ diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 43eeaad84f1..a4144fa0d8a 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -46,8 +46,8 @@ C<TeXLive::TLUtils> -- Utilities used in the TeX Live Infrastructure Modules TeXLive::TLUtils::media; TeXLive::TLUtils::initialze_installer; - TeXLive::TLUtils::binaries_available_from_disk; - TeXLive::TLUtils::binaries_available_from_net; + TeXLive::TLUtils::architectures_available; + TeXLive::TLUtils::additional_architectures_available_from_net; TeXLive::TLUtils::make_var_skeleton($path); TeXLive::TLUtils::make_local_skeleton($path); @@ -85,8 +85,8 @@ BEGIN { © &media &initialize_installer - &binaries_available_from_disk - &binaries_available_from_net + &architectures_available + &additional_architectures_available_from_net &make_var_skeleton &sub make_local_skeleton &sort_uniq @@ -104,9 +104,9 @@ BEGIN { =item C<platform> -If the directory C</usr/bin> doesn't exist we know that we're on +If C<$^O=~/MSWin(32|64)$/i> is true we know that we're on Windows and we set the global variable C<$::_platform_> to C<win32>. -If it exists we call C<config.guess>. The output of C<config.guess> +Otherwise we call C<config.guess>. The output of C<config.guess> is filtered as described below. CPU type is determined by a regexp. And it's necessary to @@ -131,7 +131,9 @@ sub platform { solaris); unless (defined $::_platform_) { - if (-d "/usr/bin") { + if ($^O=~/^MSWin(32|64)$/i) { + $::_platform_="win32"; + } else { my $CPU; # CPU type as reported by config.guess. my $OS; # O/S type as reported by config.guess. # We cannot rely on #! in config.guess but have to call /bin/sh @@ -150,8 +152,6 @@ sub platform { ($OS=$guessed_platform)=~s/.*-(.*)/$1/; } $::_platform_="$CPU-$OS"; - } else { - $::_platform_="win32"; } } return $::_platform_; @@ -436,17 +436,11 @@ sub copy { @stat=lstat "$infile"; $mode=$stat[2]; - # set write bit for user if necessary. - #$mode+=128 if ($mode%256<128); - mkdirhier ("$destdir") unless -d "$destdir"; $filename=basename "$infile"; $outfile="$destdir/$filename"; -# print "copy $infile => $outfile\n"; -# print "$infile\n"; - if (-l "$infile") { symlink readlink "$infile", "$destdir/$filename"; } else { @@ -515,74 +509,80 @@ which tl-install.pl resides (which is C<`dirname $0`> on UNIX). Then it calls C<media> and C<platform> in order to set the variables C<$::_media_> and C<$::_platform_>. +Note that C<$0> contains backslashes as path separators on Windows. + Repeatedly calls to C<media> or C<platform> do not access the CD/DVD again. =cut sub initialize_installer { - ($::_installerdir_=$0)=~s/(.*)\/.*$/$1/; + my $me=$0; + $me=~s!\\!/!g if $^O=~/^MSWin(32|64)$/i; + ($::_installerdir_=$me)=~s!(.*)/.*$!$1!; &media; &platform; } =pod -=item C<binaries_available_from_disk> +=item C<architectures_available> -The function C<binaries_available_from_disk> returns a list of -supported platforms. Media type has to be either C<CD> or C<DVD>. +The function C<architectures_available> returns a list of +supported platforms. =cut -sub binaries_available_from_disk { +sub architectures_available { my @dir; my @platforms; if (&media eq "CD") { opendir DIR, "$::_installerdir_/archive"; - } elsif (&media eq "DVD") { - opendir DIR, "$::_installerdir_/bin"; - } else { - die "Media type must be CD or DVD.\n"; - } - @dir=readdir DIR; - chomp @dir; - if (&media eq "CD") { + @dir=readdir DIR; + chomp @dir; for (@dir) { if (/bin-kpathsea.(.*).zip$/) { push @platforms, $1; } } } elsif (&media eq "DVD") { + opendir DIR, "$::_installerdir_/bin"; + @dir=readdir DIR; + chomp @dir; for my $platform (@dir) { push @platforms, $platform unless ($platform=~/^\./); } } else { - die "Media type must be CD or DVD.\n"; + foreach my $arch ($::tlpdb->available_architectures) { + push @platforms, $arch; + } } return @platforms; } - + =pod -=item C<binaries_available_from_net> +=item C<additional_architectures_available_from_net (\%vars)> -The function C<binaries_available_from_net> returns a list of -platforms supported by the TeX Live server. It downloads the file -C<$::texlive_url/texlive.tlpdb> and looks for files -C</^bin\/(.*)\/kpsewhich/>. +The function C<additional_architectures_available_from_net> returns a +list of additional platforms supported by the TeX Live server. It +downloads the file C<$::texlive_url/texlive.tlpdb> and creates a new +object c<$::tlpdb_netbin>. The argument is a reference of the global +C<%vars> hash. =cut -sub binaries_available_from_net { +sub additional_architectures_available_from_net { + my $vars=shift; my @platforms; - open TLPDB, "wget -q --output-document=- $::texlive_url/texlive.tlpdb|" - or die "Can't open $::texlive_url/texlive.tlpdb"; - while (<TLPDB>) { - if (/^ bin\/(.*)\/kpsewhich/) { - push @platforms, $1; - } - } + my $database="$::texlive_url/texlive.tlpdb"; + print "\nLoading '$database' ...\n"; + $::tlpdb_netbin=TeXLive::TLPDB->new(location => "$database"); + foreach my $arch ($::tlpdb_netbin->available_architectures) { + unless (defined $vars->{"diskbin_$arch"}) { + push @platforms, $arch; + } + } return @platforms; } |