[OE-core] [PATCH] insane: only check ${S} exists if we had sources to fetch

Ross Burton ross.burton at intel.com
Thu Jul 21 19:31:08 UTC 2016


Only check that ${S} actually exists if there was something in ${SRC_URI} to
fetch, the argument being that if SRC_URI is empty the the recipe won't be using
${S} at all.

In general recipes that have no sources can remove the unpack task, but
expecting all recipes to do this relatively advanced operation isn't realistic.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/insane.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 9b2337c..c389cfe 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1246,10 +1246,9 @@ Missing inherit gettext?""" % (gt, config))
 }
 
 python do_qa_unpack() {
-    bb.note("Checking has ${S} been created")
-
+    src_uri = d.getVar("SRC_URI", True)
     s_dir = d.getVar('S', True)
-    if not os.path.exists(s_dir):
+    if src_uri and 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))
 }
 
-- 
2.8.1




More information about the Openembedded-core mailing list