From: Darren Hart <dvhart@linux.intel.com>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] oe-init-build-env, scripts/oe-buildenv-internal: add error detecting for $BDIR
Date: Tue, 02 Aug 2011 21:06:25 -0700 [thread overview]
Message-ID: <4E38C941.30805@linux.intel.com> (raw)
In-Reply-To: <1312285430.2344.582.camel@rex>
On 08/02/2011 04:43 AM, Richard Purdie wrote:
> On Tue, 2011-08-02 at 14:08 +0800, Dexuan Cui wrote:
>> [YOCTO #671]
>>
>> "readlink -f" in Ubuntu 10.04 is buggy: it doesn't ignore a trailing / (e.g.,
>> "readlink -f /tmp/non-existent-dir/" returns nothing, but according to
>> http://www.gnu.org/s/coreutils/manual/coreutils.pdf it should do that --
>> hence we get bug 671. It seems Ubuntu 10.10 or even later Ubuntu 11.04,
>> and other Linux distributions(e.g., Open Suse 11.4) haven't such an issue.
>>
>> So I think we should detect this and ask Ubuntu 10.04 users to avoid supply
>> a path with trailing slash here.
>>
>> Moreever, I also add the detection of non-existent path, e.g.,
>> source oe-init-build-env /non-existent-dir/build
>> can be detected and we'll print an error msg.
>> And, if we get errors in oe-buildenv-internal, we should stop the script
>> and shouldn't further run.
>>
>> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
>
> Merged to master, thanks.
For a patch to address a relatively benign bug I thought the standard
procedure would be for it to await feedback for more than 5 hours. I was
hoping to have an opportunity to review this fix as I was working with
the team in root causing the bug.
+ if [ -z "$BDIR" ]; then
+ if expr "$1" : '.*/$' >/dev/null; then
+ echo >&2 "Error: please remove any trailing / in the argument."
This portion of the patch is really not necessary. There is no
meaningful difference between the path with or without the trailing
slash, a much simpler and less noisy solution would be to simply strip
the trailing slash from the user input before doing the rest of the
input validation.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-08-03 4:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 6:08 [PATCH 0/1] fix to bug 671 Dexuan Cui
2011-08-02 6:08 ` [PATCH 1/1] oe-init-build-env, scripts/oe-buildenv-internal: add error detecting for $BDIR Dexuan Cui
2011-08-02 11:43 ` Richard Purdie
2011-08-03 4:06 ` Darren Hart [this message]
2011-08-03 6:46 ` Cui, Dexuan
2011-08-03 13:50 ` Darren Hart
2011-08-03 14:01 ` Paul Eggleton
2011-08-03 14:11 ` Phil Blundell
2011-08-03 14:21 ` Paul Eggleton
2011-08-03 14:25 ` Phil Blundell
2011-08-04 2:25 ` Cui, Dexuan
2011-08-04 6:00 ` Darren Hart
2011-08-04 7:37 ` Cui, Dexuan
2011-08-04 13:44 ` Darren Hart
2011-08-04 14:49 ` Cui, Dexuan
2011-08-04 14:53 ` Phil Blundell
2011-08-04 15:14 ` Cui, Dexuan
2011-08-09 2:13 ` Cui, Dexuan
2011-08-09 4:35 ` Darren Hart
2011-08-09 14:04 ` Cui, Dexuan
2011-08-09 15:06 ` Darren Hart
2011-08-10 3:18 ` Cui, Dexuan
2011-08-10 12:21 ` Richard Purdie
2011-08-10 13:04 ` Richard Purdie
2011-08-04 12:07 ` Richard Purdie
2011-08-04 13:37 ` Darren Hart
2011-08-04 14:19 ` Richard Purdie
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=4E38C941.30805@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox