summaryrefslogtreecommitdiffstats
path: root/scripts
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-23 09:53:17 +0100
commite759b0b75db25d0b5f43e9c6e488a6be17fbe332 (patch)
treeec0d97fa9ada9ae0b2b37a7217ff3a1b1c9718c3 /scripts
parenta34f733d3a8cb300c2737a4b67f179c627efc46f (diff)
downloadpoky-e759b0b75db25d0b5f43e9c6e488a6be17fbe332.tar.gz
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. (From OE-Core rev: 087ca0c644aad19e6e7d3921f99f3056471deb65) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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):
334 else: 334 else:
335 os.rmdir(patchdir) 335 os.rmdir(patchdir)
336 336
337 if not os.listdir(srcsubdir): 337 if not os.path.exists(srcsubdir) or not os.listdir(srcsubdir):
338 raise DevtoolError("no source unpacked to S, perhaps the %s " 338 raise DevtoolError("no source unpacked to S, either the %s "
339 "recipe doesn't use any source?" % pn) 339 "recipe doesn't use any source or the "
340 "correct source directory could not be "
341 "determined" % pn)
340 342
341 if not os.path.exists(os.path.join(srcsubdir, '.git')): 343 if not os.path.exists(os.path.join(srcsubdir, '.git')):
342 bb.process.run('git init', cwd=srcsubdir) 344 bb.process.run('git init', cwd=srcsubdir)