[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1

Richard W.M. Jones rjones at redhat.com
Sat Jun 1 11:04:38 UTC 2013


The following commit has been merged in the experimental branch:
commit 6a1c76807ec483b7eab4bc62822ef1c4f12e2be6
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu May 9 17:44:44 2013 +0100

    ./run: Don't set LIBGUESTFS_PATH if --disable-appliance.
    
    Thanks Dave Vasilevsky for spotting this problem.

diff --git a/configure.ac b/configure.ac
index df6ac82..9e853d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -429,10 +429,11 @@ AC_MSG_CHECKING([if we should build the appliance])
 AC_ARG_ENABLE([appliance],
     [AS_HELP_STRING([--enable-appliance],
         [enable building the appliance @<:@default=yes@:>@])],
-        [],
-        [enable_appliance=yes])
-AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$enable_appliance" = "xyes"])
-AC_MSG_RESULT([$enable_appliance])
+        [ENABLE_APPLIANCE="$enableval"],
+        [ENABLE_APPLIANCE=yes])
+AM_CONDITIONAL([ENABLE_APPLIANCE],[test "x$ENABLE_APPLIANCE" = "xyes"])
+AC_MSG_RESULT([$ENABLE_APPLIANCE])
+AC_SUBST([ENABLE_APPLIANCE])
 
 dnl Check for supermin >= 4.1.0 or febootstrap >= 3.20.
 AC_CHECK_PROGS([SUPERMIN],
@@ -486,7 +487,7 @@ AC_ARG_WITH([supermin-extra-options],
 
 AC_SUBST([SUPERMIN_EXTRA_OPTIONS])
 
-if test "x$enable_appliance" = "xyes"; then
+if test "x$ENABLE_APPLIANCE" = "xyes"; then
     test "x$SUPERMIN" = "xno" &&
         AC_MSG_ERROR([supermin (formerly called febootstrap) must be installed])
     dnl febootstrap 2.x did not support the --version parameter
@@ -1646,7 +1647,7 @@ echo
 echo "This is how we have configured the optional components for you today:"
 echo
 echo       "Daemon .............................. $enable_daemon"
-echo       "Appliance ........................... $enable_appliance"
+echo       "Appliance ........................... $ENABLE_APPLIANCE"
 echo       "QEMU ................................ $QEMU $QEMU_OPTIONS"
 echo       "guestfish and C-based virt tools .... yes"
 echo       "FUSE filesystem ..................... $enable_fuse"
diff --git a/run.in b/run.in
index 36916b5..7545f0b 100755
--- a/run.in
+++ b/run.in
@@ -62,8 +62,14 @@ export LIBGUESTFS_CACHEDIR="$b/tmp"
 mkdir -p "$b/tmp"
 chcon --reference=/tmp tmp 2>/dev/null ||:
 
-# Set local environment relative to this script.
-export LIBGUESTFS_PATH="$b/appliance"
+# Only set path if the appliance was enabled.
+if [ "x at ENABLE_APPLIANCE@" = "xyes" ]; then
+    export LIBGUESTFS_PATH="$b/appliance"
+elif [ -z "$LIBGUESTFS_PATH" ]; then
+    echo "run: error: You used './configure --disable-appliance' so you must put an"
+    echo "run: error: appliance somewhere and set LIBGUESTFS_PATH to point to it."
+    exit 1
+fi
 
 if [ -z "$LD_LIBRARY_PATH" ]; then
     LD_LIBRARY_PATH="$b/src/.libs:$b/gobject/.libs"

-- 
Libguestfs Debian packaging



More information about the Pkg-libvirt-commits mailing list