From: Robert Yang <liezhi.yang@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH][master][fido][dizzy] Revert "perf: fix for rebuilding"
Date: Wed, 16 Sep 2015 17:07:13 +0800 [thread overview]
Message-ID: <55F93141.9080608@windriver.com> (raw)
In-Reply-To: <CAJTo0LYNyBdzb64QZHYobCdKUm-w1wAK4M3bn7CvCFmxR_ak4w@mail.gmail.com>
On 09/16/2015 04:57 PM, Burton, Ross wrote:
>
> On 16 September 2015 at 08:48, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
> I've figured out the reason, this is because the task's default cwd
> is ${B}, the easier way to fix the problem is use mkdir -p rather than
> mkdir, autotools.bbclass also has this problem, but I'd like to fix
> exec_func, I will send a patch to bitbake-devel after more testing.
>
>
> Changing the default $B of [dirs] is not something we'll be doing post-M3. I've
Thanks, so let's simply use "mkdir -p" to fix the problem, atm ?
> a branch that changes that default and have fixed all the obvious breakage in
> oe-core already so this is something on my plan for immediately after 2.1
> branches off.
I made 2 patches just now, one is for bitbake, and one for insane.bbclass,
maybe we are doing the similar things, I can drop them then.
build.py: default exec_func's cwd to WORKDIR
This can fix a few problems:
- The ${B} was nearly always created in the past after any tak runs, for
example, the ${B} exists after do_clean or do_cleansstate (first
removed, then created), but ${B} is useless and confused end user in
this case, the similar to a lot of prefuncs and postfuncs which also
create ${B}, but not used. This patch fixes the problem.
- This can fix race issue when we use the following commands in other
tasks:
rm -rf ${B}
mkdir ${B}
such as autotools.bbclass and perf.bb.
When the 'dirs' or 'cleandirs' is not specified by task, which means
that they are not important, so default to WORKDIR which is more common
and usually existed.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py
index 948c395..a413c35 100644
--- a/bitbake/lib/bb/build.py
+++ b/bitbake/lib/bb/build.py
@@ -182,8 +182,9 @@ def exec_func(func, d, dirs = None):
bb.utils.mkdirhier(adir)
adir = dirs[-1]
else:
- adir = d.getVar('B', True)
- bb.utils.mkdirhier(adir)
+ adir = d.getVar('WORKDIR', True)
+ if not os.path.exists(adir):
+ bb.utils.mkdirhier(adir)
ispython = flags.get('python')
===================
insane.bbclass: only do_qa_unpack warn when SRC_URI is not null
If SRC_URI is null, then no source is needed to be unpacked, thus no
warn.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 5c8629a..e22e8a0 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1214,7 +1214,7 @@ python do_qa_unpack() {
bb.note("Checking has ${S} been created")
s_dir = d.getVar('S', True)
- if not os.path.exists(s_dir):
+ if not os.path.exists(s_dir) and d.getVar('SRC_URI', True):
bb.warn('%s: the directory %s (%s) pointed to by the S variable
doesn\'t exist - please set S within the recipe to point to where the source has
been unpacked to' % (d.getVar('PN', T
}
// Robert
>
> Ross
next prev parent reply other threads:[~2015-09-16 9:07 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 16:00 Robert Yang : perf: fix for rebuilding Martin Jansa
2015-09-10 16:05 ` Martin Jansa
2015-09-15 5:29 ` [PATCH][master][fido][dizzy] Revert "perf: fix for rebuilding" Martin Jansa
2015-09-15 5:53 ` Robert Yang
2015-09-16 7:48 ` Robert Yang
2015-09-16 8:57 ` Burton, Ross
2015-09-16 9:07 ` Robert Yang [this message]
2015-09-21 19:04 ` Martin Jansa
2015-09-21 19:36 ` [RFC][PATCH] perf: don't re-create ${B} Martin Jansa
2015-09-21 20:33 ` [RFC][PATCHv2] cmake.bbclass, " Martin Jansa
2015-09-21 20:55 ` Burton, Ross
2015-09-22 5:44 ` Martin Jansa
2015-09-22 8:10 ` Richard Purdie
2015-09-22 9:36 ` Burton, Ross
2015-09-22 5:48 ` [RFC][PATCHv3] autotools.bbclass, " Martin Jansa
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=55F93141.9080608@windriver.com \
--to=liezhi.yang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/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