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

Re: [Xen-devel] [PATCH v2 1/5] tools/build: fix pygrub linking



On Wed, Aug 01, Ian Campbell wrote:

> > > diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
> > > index bd22dd4..8c99e11 100644
> > > --- a/tools/pygrub/Makefile
> > > +++ b/tools/pygrub/Makefile
> > > @@ -14,7 +14,10 @@ install: all
> > >           $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
> > >           --install-scripts=$(PRIVATE_BINDIR) --force
> > >   $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
> > > - ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR)
> > > + set -e; if [ `readlink -f $(DESTDIR)/$(BINDIR)` != \
> > > +              `readlink -f $(PRIVATE_BINDIR)` ]; then \
> > > +     ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
> > > + fi

This needs quoting for the shell, like shown below:

[  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

diff -r 3d622e2c7cfb tools/pygrub/Makefile
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -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
 
Olaf

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.