[gnome-continuous-yocto/gnomeostree-3.28-rocko: 1719/8267] base.bbclass wipe ${S} before unpacking source
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 1719/8267] base.bbclass wipe ${S} before unpacking source
- Date: Sat, 16 Dec 2017 22:13:17 +0000 (UTC)
commit a56fb90dc3805494eeaf04c60538425e8d52efc5
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date: Tue Mar 22 18:47:00 2016 +0200
base.bbclass wipe ${S} before unpacking source
Make sure that we have a pristine source tree after do_unpack.
[YOCTO #9064]
(From OE-Core rev: eccae514b71394ffaed8fc45dea7942152a334a1)
Signed-off-by: Markus Lehtonen <markus lehtonen linux intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/base.bbclass | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 5d8e8d6..f2e3d40 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -136,23 +136,21 @@ python base_do_fetch() {
addtask unpack after do_fetch
do_unpack[dirs] = "${WORKDIR}"
+
+python () {
+ if d.getVar('S', True) != d.getVar('WORKDIR', True):
+ d.setVarFlag('do_unpack', 'cleandirs', '${S}')
+ else:
+ d.setVarFlag('do_unpack', 'cleandirs', os.path.join('${S}', 'patches'))
+}
python base_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
- rootdir = d.getVar('WORKDIR', True)
-
- # Ensure that we cleanup ${S}/patches
- # TODO: Investigate if we can remove
- # the entire ${S} in this case.
- s_dir = d.getVar('S', True)
- p_dir = os.path.join(s_dir, 'patches')
- bb.utils.remove(p_dir, True)
-
try:
fetcher = bb.fetch2.Fetch(src_uri, d)
- fetcher.unpack(rootdir)
+ fetcher.unpack(d.getVar('WORKDIR', True))
except bb.fetch2.BBFetchException as e:
raise bb.build.FuncFailed(e)
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]