[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] build: fix test for --nocompress option



Jim Meyering wrote:
> it's interpreting [--nocompress] as a range: "-" through "n", plus
> the other characters, ocmpres.  "k" falls in the --n range.
>
> Anyhow, here's the fix:
>

Here's a more complete fix, since there was another
similar echo stmt that required quotes:

>From 4c84ba453fe9a4b6903885f93b92f32135dc53d3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Wed, 29 Jul 2009 16:33:02 -0400
Subject: [PATCH] build: fix test for --nocompress option

* configure.ac: Fix underquoting-with-bash bug that would
cause the test for --nocompress in the output of
febootstrap-to-initramfs' usage string always to fail.
---
 configure.ac |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0ae20be..20edc70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,7 +248,7 @@ if test "x$enable_supermin" = "xyes"; then
     AC_MSG_CHECKING([for --files support in $FEBOOTSTRAP_TO_INITRAMFS])
     out=`$FEBOOTSTRAP_TO_INITRAMFS 2>&1 ||:`
     echo "febootstrap_to_initramfs test command output: $out" >&AS_MESSAGE_LOG_FD
-    if ! echo $out | grep -sq -- "--files" ; then
+    if ! echo "$out" | grep -sq -e --files ; then
         AC_MSG_RESULT([no])
 	AC_MSG_FAILURE(
 [febootstrap-to-initramfs does not support the --files option.
@@ -264,7 +264,7 @@ version of febootstrap.
     AC_MSG_CHECKING([for --nocompress support in $FEBOOTSTRAP_TO_INITRAMFS])
     out=`$FEBOOTSTRAP_TO_INITRAMFS 2>&1 ||:`
     echo "febootstrap_to_initramfs test command output: $out" >&AS_MESSAGE_LOG_FD
-    if ! echo $out | grep -sq -- "--nocompress" ; then
+    if ! echo "$out" | grep -sq -e --nocompress ; then
         AC_MSG_RESULT([no])
 	AC_MSG_FAILURE(
 [febootstrap-to-initramfs does not support the --nocompress option.
--
1.6.3.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]