summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-11-10 14:45:14 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-23 11:10:12 +0000
commit0ffd92707b089ecdd8ec81430cebae85aca4be00 (patch)
tree50d6c61c213c43b0e8cc23978924ad23ecc52853 /scripts/lib/devtool/standard.py
parent47594d59ec4ab82fcf87d3c590caf7c46a6bfdff (diff)
downloadpoky-0ffd92707b089ecdd8ec81430cebae85aca4be00.tar.gz
devtool: update-recipe: check output before treating it as a string
As of the move to Python 3 and the fixes we applied at that time, bb.process.run() will return a byte array of length 0 rather than an empty string if the output is empty. That may be a bug that we should fix, but for now it's easiest to just check the result here before treating it as a string. This fixes running "devtool update-recipe" or "devtool finish" on a recipe which has no source tree, for example initramfs-framework. Fixes [YOCTO #10563]. (From OE-Core rev: 66bf6978fc807ecc422fb6b6328f68bc3406cf15) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 4523048b38..1511641099 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -332,10 +332,11 @@ def _git_ls_tree(repodir, treeish='HEAD', recursive=False):
332 cmd.append('-r') 332 cmd.append('-r')
333 out, _ = bb.process.run(cmd, cwd=repodir) 333 out, _ = bb.process.run(cmd, cwd=repodir)
334 ret = {} 334 ret = {}
335 for line in out.split('\0'): 335 if out:
336 if line: 336 for line in out.split('\0'):
337 split = line.split(None, 4) 337 if line:
338 ret[split[3]] = split[0:3] 338 split = line.split(None, 4)
339 ret[split[3]] = split[0:3]
339 return ret 340 return ret
340 341
341def _git_exclude_path(srctree, path): 342def _git_exclude_path(srctree, path):