From: Christoph Egger <chegger@amazon.de>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH] tools/pygrub: do not override pygrub with a symbolic link
Date: Mon, 22 Apr 2013 14:26:42 +0200 [thread overview]
Message-ID: <51752C82.7010308@amazon.de> (raw)
In-Reply-To: <1366631923.22143.47.camel@zakaz.uk.xensource.com>
On 22.04.13 13:58, Ian Campbell wrote:
> On Mon, 2013-04-22 at 12:50 +0100, Christoph Egger wrote:
>> tools/pygrub: Do not override pygrub with a symbolic link if $(BINDIR)
>> and $(PRIVATE_BINDIR) are the same.
>
> More properly this is "fix the if condition we use to decide when to
> create the symlink", since it is already the intention to not override
> if they are the same but the condition is written wrong since it
> includes DESTDIR on one side but not the other, which defeats the check.
>
> FWIW I would niuke the DESTDIR on the left rather than adding it on the
> right, it might even fit on one line then?
Does not work. See comment below.
>
>> Signed-off-by: Christoph Egger <chegger@amazon.de>
>> diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
>> index 039f7f7..c3b34d7 100644
>> --- a/tools/pygrub/Makefile
>> +++ b/tools/pygrub/Makefile
>> @@ -15,8 +15,8 @@ install: all
>> --install-scripts=$(PRIVATE_BINDIR) --force
>> $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
>> set -e; if [ "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
>> - "`readlink -f $(PRIVATE_BINDIR)`" ]; then \
>> - ln -sf $(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
>> + "`readlink -f $(DESTDIR)/$(PRIVATE_BINDIR)`" ]; then \
>> + ln -sf $(DESTDIR)/$(PRIVATE_BINDIR)/pygrub $(DESTDIR)/$(BINDIR); \
>
> I don't think this change to the first path passed to ln is correct
> since this will become the content of the symlink, which doesn't want to
> include DESTDIR.
What actually happens when $(BINDIR) and $(PRIVATE_BINDIR) are equal
is that the pygrub python script does not exist. pygrub is a symbolic
link to a file that doesn't exist instead.
With this patch you will actually install the pygrub python script
rather a symbolic link.
Christoph
next prev parent reply other threads:[~2013-04-22 12:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 11:50 [PATCH] tools/pygrub: do not override pygrub with a symbolic link Christoph Egger
2013-04-22 11:58 ` Ian Campbell
2013-04-22 12:26 ` Christoph Egger [this message]
2013-04-22 12:34 ` Ian Campbell
2013-04-22 13:07 ` Christoph Egger
2013-04-22 14:31 ` Ian Campbell
2013-04-22 14:48 ` Christoph Egger
2013-04-22 18:36 ` Matt Wilson
2013-04-24 11:56 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2013-04-22 11:50 Christoph Egger
2013-04-22 18:34 ` Matt Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51752C82.7010308@amazon.de \
--to=chegger@amazon.de \
--cc=Ian.Campbell@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.