[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 Thu, 2012-07-26 at 20:54 +0100, Roger Pau Monne wrote:
> Prevent creating a symlink to $(DESTDIR)/$(BINDIR) if it is the same
> as $(PRIVATE_BINDIR)
> 
> This fixes NetBSD install, where $(DESTDIR)/$(BINDIR) ==
> $(PRIVATE_BINDIR).

OOI why does netbsd install these internal utilities, which includes
things like libxl-save-helper (which absolutely is no use to call as a
user) in the regular bin dir rather than libexec or some other
acceptable place?

I'm sure there are some things which are wrongly in PRIVATE_BINDIR
instead of BINDIR but the right answer there would be to move them.

> Changes since v1:
> 
>  * Do the check in shell instead of Makefile.
> 
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Christoph Egger <Christoph.Egger@xxxxxxx>
> Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> ---
>  tools/pygrub/Makefile |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> 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
>  
>  .PHONY: clean
>  clean:



_______________________________________________
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®.