Only call zic if available in BUILD_ROOT
authorDaniel Gollub <gollub@b1-systems.de>
Mon, 23 Apr 2012 14:02:19 +0000 (16:02 +0200)
committerAdrian Schröter <adrian@suse.de>
Mon, 21 May 2012 12:50:39 +0000 (14:50 +0200)
this is not the case in minimalistic crossbuild sysroots.

Changes behavior of build: zic now get called with absolute path.

Following location get checked:
/usr/sbin/zic /usr/bin/zic /bin/zic /sbin/zic

SUSE and RHEL5 is using /usr/sbin/zic
ArchLinux seemd to use /usr/bin/zic at some point

init_buildsystem

index 50a9087..99634e0 100755 (executable)
@@ -1186,7 +1186,9 @@ for PROG in /usr/bin/TeX/texhash /usr/bin/texhash ; do
 done
 
 if test -e $BUILD_ROOT/usr/share/zoneinfo/UTC ; then
-    chroot $BUILD_ROOT zic -l UTC
+    for PROG in /usr/sbin/zic /usr/bin/zic /bin/zic /sbin/zic ; do
+        test -x $BUILD_ROOT/$PROG  && chroot $BUILD_ROOT $PROG -l UTC
+    done
 fi
 
 test -e $BUILD_ROOT/.build/init_buildsystem.data || HOST=`hostname`