]> code.ossystems Code Review - openembedded-core.git/commitdiff
devtool: better handling for recipes that don't unpack source
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 22 Sep 2015 16:21:32 +0000 (17:21 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 Sep 2015 17:12:57 +0000 (18:12 +0100)
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@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/devtool/standard.py

index 2dbe37263c384aa2739e9479a7405054afa3bb9e..ff79c05e39548669f1603937f0454c54cee68b6a 100644 (file)
@@ -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)