[tex-live] install-tl.sh hangs on empty PKGONLY.list

Jason Stover jhs at math.gcsu.edu
Fri Nov 16 17:27:45 CET 2007


On OpenBSD 4.1, install-tl.sh will hang while tar'ing the
files listed in $work_dir/PKGONLY.list if PKGONLY.list is empty.
The problem is that tar is waiting for the contents of the file
from the empty PKGONLY.list, redirected through stdin.

This problem was mentioned briefly in an earlier post on Tue May 1
15:46:31 CEST 2007. That post mentioned the problem can be fixed by
typing <ctrl>+d when the tar waits.

The following patch fixed the problem in install-tl.sh, eliminating
the need for <ctrl>+d:

--- /mnt/install-tl.sh	Sun Jan  7 19:04:37 2007
+++ my-install.sh	Thu Nov 15 17:16:04 2007
@@ -297,6 +297,8 @@
   $debug && echo " from the lists in $work_dir... " >&2
   for f in `ls $work_dir/*.*list`
   do
+      # If a file is empty, tar will hang.
+      if [ -s $f ]; then
 	  $debug && echo "Copy files listed in $f" >&2
 	  $debug || $echon "`basename $f .list` " >&2
 	  sort -u $f > $f.uniq
@@ -308,6 +310,7 @@
 	      $debug && tarverbose=-v
 	      (cd $CDDIR && $TARPROG -c -f - $TAROPT $f.uniq) \
 		  | (cd $TEXDIR && umask 0 && $TARPROG -x $tarverbose -f -)
+	  fi
       fi
  done 
  echo


-Jason


More information about the tex-live mailing list