diff options
author | Jim Meyering <jim@meyering.net> | 2009-07-29 22:50:44 +0200 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-07-30 09:42:17 +0100 |
commit | fe1f08254967f7d053101fe3c5171346ae2be93e (patch) | |
tree | c8844ec23b6af2f4ba9deb7cf46f797e3fd79213 /configure.ac | |
parent | 5fd9891646a16792dda91505db6610ad9e36a704 (diff) | |
download | libguestfs-fe1f08254967f7d053101fe3c5171346ae2be93e.tar.gz libguestfs-fe1f08254967f7d053101fe3c5171346ae2be93e.tar.xz libguestfs-fe1f08254967f7d053101fe3c5171346ae2be93e.zip |
build: fix test for --nocompress option
The test for febootstrap-to-initramfs' --nocompress option
was always failing for me on F11. Here's why:
$ bash ~/w/co/libguestfs:210-comment-fix
$ t=`febootstrap-to-initramfs 2>&1`
[Exit 1]
$ if ! echo $t|grep -sq -- --nocompress; then echo not found; fi
not found
Notice: without quotes, the [--nocompress] term expands to "k",
because I happen to have a temporary file named "k":
$ echo $t
Usage: febootstrap-to-initramfs [--files=filelist] k DIR Please read
febootstrap-to-initramfs(8) man page for more information.
$ echo "$t"
Usage: febootstrap-to-initramfs [--files=filelist] [--nocompress] DIR
Please read febootstrap-to-initramfs(8) man page for more information.
a simpler example gives a clue:
$ touch a b c
$ echo [--z]
a b c
$ echo [--a]
a
$ echo [--b]
a b
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:
>From 84855642ed41828d01d55123cfab8d8dede759c1 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 bug that would cause the test
for febootstrap-to-initramfs' --nocompress option always to fail
with certain-letter-named files in the top directory.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 0ae20be6..6bdf7d4a 100644 --- a/configure.ac +++ b/configure.ac @@ -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. |