[oe-commits] Bian Naimeng : do_unpack: move qa check of unpack into insane.bbclass

git at git.openembedded.org git at git.openembedded.org
Mon Jul 20 09:42:02 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 81216da9fa90dc8a67a0f367742b1e73afec0aa1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=81216da9fa90dc8a67a0f367742b1e73afec0aa1

Author: Bian Naimeng <biannm at cn.fujitsu.com>
Date:   Fri Jul  3 11:47:47 2015 +0800

do_unpack: move qa check of unpack into insane.bbclass

Some source archive are not standard format.
For example, sometimes, we still need decompress file once again after base_do_unpack,
in such case, the following warning will be caught.

 WARNING: xxx : the directory ${WORKDIR}/xxxx (xxxxxx) 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

So, we should do this QA check after all of unpack jobs been completed.

Signed-off-by: Bian Naimeng <biannm at cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/classes/base.bbclass   |  3 ---
 meta/classes/insane.bbclass | 12 ++++++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index fe803f1..e541789 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -152,9 +152,6 @@ python base_do_unpack() {
         fetcher.unpack(rootdir)
     except bb.fetch2.BBFetchException as e:
         raise bb.build.FuncFailed(e)
-
-    if not os.path.exists(s_dir):
-        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', True), d.getVar('S', False), s_dir))
 }
 
 def pkgarch_mapping(d):
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 4537eec..fc3d5ff 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1140,6 +1140,15 @@ Missing inherit gettext?""" % (gt, config))
         except subprocess.CalledProcessError:
             pass
 }
+
+python do_qa_unpack() {
+    bb.note("Checking has ${S} been created")
+
+    s_dir = d.getVar('S', True)
+    if not os.path.exists(s_dir):
+        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', True), d.getVar('S', False), s_dir))
+}
+
 # The Staging Func, to check all staging
 #addtask qa_staging after do_populate_sysroot before do_build
 do_populate_sysroot[postfuncs] += "do_qa_staging "
@@ -1149,6 +1158,9 @@ do_populate_sysroot[postfuncs] += "do_qa_staging "
 #addtask qa_configure after do_configure before do_compile
 do_configure[postfuncs] += "do_qa_configure "
 
+# Check does S exist.
+do_unpack[postfuncs] += "do_qa_unpack"
+
 python () {
     tests = d.getVar('ALL_QA', True).split()
     if "desktop" in tests:



More information about the Openembedded-commits mailing list