[tex-live] install-tl: fall back to lzma binaries in $PATH

Jukka Salmi j+tex-live at 2008.salmi.ch
Fri Oct 31 15:43:22 CET 2008


Hello,

what about changing install-tl to search for lzma binaries in $PATH if
they are not found on the DVD, as it's already done with wget? (I use
this to install TL on NetBSD systems for which there are no binaries
provided.) Patch attached.


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
-------------- next part --------------
--- tlpkg/TeXLive/TLUtils.pm.orig	2008-08-05 01:28:20.000000000 +0200
+++ tlpkg/TeXLive/TLUtils.pm	2008-10-31 15:13:15.000000000 +0100
@@ -1008,16 +1008,8 @@ Returns true if successfull, otherwise f
 sub setup_programs {
   my ($bindir, $platform) = @_;
   $::progs{'wget'} = "wget";
-  if (!defined($platform) || ($platform eq "")) {
-    # we assume that we run from the DVD, so we can call platform() and
-    # thus also the config.guess script
-    # but we have to setup $::installerdir because the platform script
-    # relies on it
-    $::installerdir = "$bindir/../..";
-    $platform = platform();
-  }
-  $::progs{'lzmadec'} = "$bindir/lzma/lzmadec.$platform";
-  $::progs{'lzma'} = "$bindir/lzma/lzma.$platform";
+  $::progs{'lzmadec'} = "lzmadec";
+  $::progs{'lzma'} = "lzma";
   $::progs{'tar'} = "tar";
 
   if ($^O =~ /^MSWin(32|64)$/i) {
@@ -1026,8 +1018,21 @@ sub setup_programs {
     $::progs{'lzmadec'} = conv_to_win_path("$bindir/lzma/lzmadec.win32.exe");
     $::progs{'lzma'}    = conv_to_win_path("$bindir/lzma/lzma.exe");
 
-  } elsif (-r "$bindir/wget/wget.$platform") {
-    $::progs{'wget'}    = "$bindir/wget/wget.$platform";
+  } else {
+    if (!defined($platform) || ($platform eq "")) {
+      # we assume that we run from the DVD, so we can call platform() and
+      # thus also the config.guess script
+      # but we have to setup $::installerdir because the platform script
+      # relies on it
+      $::installerdir = "$bindir/../..";
+      $platform = platform();
+    }
+    $::progs{'wget'} = "$bindir/wget/wget.$platform"
+      if -x "$bindir/wget/wget.$platform";
+    $::progs{'lzmadec'} = "$bindir/lzma/lzmadec.$platform"
+      if -x "$bindir/lzma/lzmadec.$platform";
+    $::progs{'lzma'} = "$bindir/lzma/lzma.$platform"
+      if -x "$bindir/lzma/lzma.$platform";
   }
   # 
   # check that the programs are actually working


More information about the tex-live mailing list