diff options
author | Karl Berry <karl@freefriends.org> | 2008-12-16 01:08:20 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-12-16 01:08:20 +0000 |
commit | 4eb8388045f37bc9f85776837a427892e2df987b (patch) | |
tree | 59bcd7d3dac51f46d05827bdc2323099f8dcba2c /Master | |
parent | 6ee85acdab7a2f133e0ff423e1e0d13d436c9f41 (diff) |
TLPSRC: doc fix; TLUtils (platform): die if config.guess returns nothing
git-svn-id: svn://tug.org/texlive/trunk@11628 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPSRC.pm | 9 | ||||
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 35 |
2 files changed, 24 insertions, 20 deletions
diff --git a/Master/tlpkg/TeXLive/TLPSRC.pm b/Master/tlpkg/TeXLive/TLPSRC.pm index 87969bdb859..d2d13d98543 100644 --- a/Master/tlpkg/TeXLive/TLPSRC.pm +++ b/Master/tlpkg/TeXLive/TLPSRC.pm @@ -798,14 +798,13 @@ intervening subdirectories, e.g.: =item C<r> I<regexp> -includes all files matching the regexp C<^>I<regexp>C<$>. +includes all files matching the regexp C</^regexp$/> =item C<a> I<name1> [<name2> ...] -includes auto-generated patterns for each I<name> as if the package -itself were named I<name>. That is useful if a package contains -top-level directories named after different fonts; for example, -C<venturisadf>. +includes auto generated patterns for each I<nameN> as if the package +itself would be named I<nameN>. That is useful if a package (like venturisadf) +contains toplevel directories named after different fonts. =back diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 50e92e57ae8..c372dd0c766 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -234,31 +234,36 @@ sub platform { if ($^O=~/^MSWin(32|64)$/i) { $::_platform_="win32"; } else { - my $config_guess="$::installerdir/tlpkg/installer/config.guess"; - my @OSs=qw(aix cygwin darwin freebsd hpux irix linux netbsd - openbsd solaris); - my $CPU; # CPU type as reported by config.guess. - my $OS; # O/S type as reported by config.guess. + my $config_guess = "$::installerdir/tlpkg/installer/config.guess"; + my @OSs = qw(aix cygwin darwin freebsd hpux irix linux netbsd + openbsd solaris); + # We cannot rely on #! in config.guess but have to call /bin/sh # explicitly because sometimes the 'noexec' flag is set in # /etc/fstab for ISO9660 file systems. - my $guessed_platform=`/bin/sh $config_guess`; - chomp $guessed_platform; - $guessed_platform=~s/^x86_64-(.*)-freebsd/amd64-$1-freebsd/; - ($CPU=$guessed_platform)=~s/(.*?)-.*/$1/; + chomp (my $guessed_platform = `/bin/sh $config_guess`); + + # For example, if the disc or reader has hardware problems. + die "$0: could not run $config_guess, cannot proceed, sorry" + if ! $guessed_platform; + + $guessed_platform =~ s/^x86_64-(.*)-freebsd/amd64-$1-freebsd/; + my $CPU; # CPU type as reported by config.guess. + my $OS; # O/S type as reported by config.guess. + ($CPU = $guessed_platform) =~ s/(.*?)-.*/$1/; $CPU =~ s/^alpha(.*)/alpha/; - foreach my $os (@OSs) { - $OS=$os if $guessed_platform=~/$os/; + for my $os (@OSs) { + $OS = $os if $guessed_platform =~ /$os/; } if ($OS eq "darwin") { $CPU = "universal"; # TL provides universal binaries - } elsif ($CPU=~/^i.86$/) { - $CPU=~s/i.86/i386/; + } elsif ($CPU =~ /^i.86$/) { + $CPU =~ s/i.86/i386/; } unless (defined $OS) { - ($OS=$guessed_platform)=~s/.*-(.*)/$1/; + ($OS = $guessed_platform) =~ s/.*-(.*)/$1/; } - $::_platform_="$CPU-$OS"; + $::_platform_ = "$CPU-$OS"; } } return $::_platform_; |