[Libguestfs] [PATCH] run: Don't fail on missing LIBGUESTFS_PATH if --disable-appliance

Hilko Bengen bengen at hilluzination.de
Sun May 19 13:53:37 UTC 2013


Set LIBGUESTFS_PATH to the default value compiled into and output a
warning to STDERR, instead.

The previous behavior caused the build to abort when trying to build
the sysprep documentation -- without much of a hint of what went
wrong.

When LIBGUESTFS_PATH was not set, test-events.sh would fail.
---
 run.in |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/run.in b/run.in
index 7545f0b..5adaa3a 100755
--- a/run.in
+++ b/run.in
@@ -66,9 +66,11 @@ chcon --reference=/tmp tmp 2>/dev/null ||:
 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
+    cat <<'EOF' >&2
+run: warning: LIBGUESTFS_PATH is not set. Setting it to @libdir@/guestfs
+EOF
+    LIBGUESTFS_PATH=@libdir@/guestfs
+    export LIBGUESTFS_PATH
 fi
 
 if [ -z "$LD_LIBRARY_PATH" ]; then
-- 
1.7.10.4




More information about the Libguestfs mailing list