summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-09-22 17:21:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-22 18:12:57 +0100
commit087ca0c644aad19e6e7d3921f99f3056471deb65 (patch)
treeb651457b332951dd9757c037f3e9406b57332587
parent0bab8086fdef93b88d5ec6b88b07ccc921dd786f (diff)
downloadopenembedded-core-contrib-087ca0c644aad19e6e7d3921f99f3056471deb65.tar.gz
openembedded-core-contrib-087ca0c644aad19e6e7d3921f99f3056471deb65.tar.bz2
openembedded-core-contrib-087ca0c644aad19e6e7d3921f99f3056471deb65.zip
devtool: better handling for recipes that don't unpack source
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>
-rw-r--r--scripts/lib/devtool/standard.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 2dbe37263c..ff79c05e39 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)