mirror of
https://git.yoctoproject.org/poky
synced 2026-03-17 04:39:40 +01:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
a34f733d3a
commit
e759b0b75d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user