pygrub: add quoting to install receipe
authorOlaf Hering <olaf@aepfle.de>
Thu, 2 Aug 2012 09:46:02 +0000 (10:46 +0100)
committerOlaf Hering <olaf@aepfle.de>
Thu, 2 Aug 2012 09:46:02 +0000 (10:46 +0100)
The changeset 25694:e20085770cb5 causes a syntax error if readline
returns nothing due to non-existant path:

[  148s] set -e; if [ `readlink -f /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install//usr/bin` != \
[  148s]              `readlink -f /usr/lib64/xen/bin` ]; then \
[  148s]     ln -sf /usr/lib64/xen/bin/pygrub /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install//usr/bin; \
[  148s] fi
[  148s] /bin/sh: line 0: [: /home/abuild/rpmbuild/BUILD/xen-4.2.25700/non-dbg/dist/install/usr/bin: unary operator expected

Add quoting to fix the error.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/pygrub/Makefile

index 8c99e11b68951e3ac8f291a89db25928715e2c53..039f7f7e4a18d19549555287616e218b180d213b 100644 (file)
@@ -14,8 +14,8 @@ install: all
                $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
                --install-scripts=$(PRIVATE_BINDIR) --force
        $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-       set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
-                    `readlink -f $(PRIVATE_BINDIR)` ]; then \
+       set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
+                    "`readlink -f $(PRIVATE_BINDIR)`" ]; then \
            ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
        fi