From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] core: ensure we use the realpath(3) of DL_DIR
Date: Sun, 18 Nov 2018 19:38:17 +0100 [thread overview]
Message-ID: <87efbinsdi.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20181115170348.15731-1-yann.morin.1998@free.fr> (Yann E. MORIN's message of "Thu, 15 Nov 2018 18:03:48 +0100")
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> When $(TOPDIR)/dl is a symlink, checking out git submodules can fail,
> as reported by Michael in #11086.
> To reproduce a similarly-related mis-behaviour:
> $ mkdir -p foo/bar foo/buz
> $ cd foo/bar
> $ ln -s ../buz meh
> $ cd meh
> $ cd ../../foo
> The last command should not succeed, because, relative to meh, there is
> no ../../foo directory; we would expect it to be ../../../foo, instead.
> But since meh is a symlink to a directory, then a relative path from that
> symlink is interpreted as relative to the derefrenced directory, i.e.
> from buz in this case.
> But where this gine even werider, is that, if the last command is
> replaced by:
> $ cd ../../../foo
> then it still works, too.
> And that is the root of Michael's issue: the dl directory in Buildroot's
> TOPDIR is a symlink to a similarly-named directory one directory higher,
> which then confuses relative paths, which gets especially and noticeably
> bad for git submodules.
> Avoid this strangeness, and just use so-called "physical" path, i.e. a
> path where all symlinks to directories have been dereferenced.
> Fixes: #11086
> Reported-by: Michael Nosthoff <posted@heine.so>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Michael Nosthoff <posted@heine.so>
Committed, thanks.
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2018-11-18 18:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-15 17:03 [Buildroot] [PATCH] core: ensure we use the realpath(3) of DL_DIR Yann E. MORIN
2018-11-18 18:38 ` Peter Korsgaard [this message]
2018-11-26 16:15 ` Peter Korsgaard
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=87efbinsdi.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox