[OE-core] [PATCH 18/27] devtool: better handling for recipes that don't unpack source

Paul Eggleton paul.eggleton at linux.intel.com
Tue Sep 22 16:21:32 UTC 2015


Some recipes don't extract any source (for example, opkg-keyrings). We
were producing a traceback in this case because we weren't checking if
the directory existed.

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
 scripts/lib/devtool/standard.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 2dbe372..ff79c05 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -334,9 +334,11 @@ def _extract_source(srctree, keep_temp, devbranch, d):
             else:
                 os.rmdir(patchdir)
 
-        if not os.listdir(srcsubdir):
-            raise DevtoolError("no source unpacked to S, perhaps the %s "
-                               "recipe doesn't use any source?" % pn)
+        if not os.path.exists(srcsubdir) or not os.listdir(srcsubdir):
+            raise DevtoolError("no source unpacked to S, either the %s "
+                               "recipe doesn't use any source or the "
+                               "correct source directory could not be "
+                               "determined" % pn)
 
         if not os.path.exists(os.path.join(srcsubdir, '.git')):
             bb.process.run('git init', cwd=srcsubdir)
-- 
2.1.0




More information about the Openembedded-core mailing list