On 3/15/19 12:50 PM, Antonio Ospite wrote: > From: Antonio Ospite <antonio.osp...@collabora.com> > > The configure script breaks when the qemu source directory is in a path > containing white spaces, in particular the list of targets is not > correctly generated when calling "./configure --help". > > To avoid this issue, refuse to run the configure script if there are > spaces or colons in the source path, this is also what kbuild from linux > does. > > Buglink: https://bugs.launchpad.net/qemu/+bug/1817345 > > Signed-off-by: Antonio Ospite <antonio.osp...@collabora.com> > --- > configure | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/configure b/configure > index 7071f52584..fbd70a0f51 100755 > --- a/configure > +++ b/configure > @@ -295,6 +295,11 @@ libs_qga="" > debug_info="yes" > stack_protector="" > > +if printf "%s" "$(realpath "$source_path")" | grep -q "[[:space:]:]";
Why realpath? If my sources live in "/home/me/bad dir" but I have a symlink "/home/me/good", this prevents me from building even though I won't trip the problem. Also, grep is not required to operate on non-text files (the POSIX definition states that if your input does not end in a newline, it is not a text file, and grep can skip that line) - better is to use "%s\n" in some form. So I'd rather see this just use: if printf %s\\n "$PWD" | grep -q "[[:space:]:]" -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature