summaryrefslogtreecommitdiffstats
path: root/meta/classes/recipe_sanity.bbclass
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2014-04-11 20:56:13 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-04-23 11:43:27 +0100
commit2b9660cad05e2e7a630caa3015d03340da1b93f3 (patch)
tree3aa3c47e84946cec6c6522b4ee70c57e68d0d66b /meta/classes/recipe_sanity.bbclass
parente2661d73672947f0981ffacfeed28209c8a6a128 (diff)
downloadpoky-2b9660cad05e2e7a630caa3015d03340da1b93f3.tar.gz
recipe_sanity.bbclass: avoid error when running 'bitbake -e'
Running 'bitbake -e' without further arguments causes a stack trace on stderr: | ERROR: Command execution failed: Traceback (most recent call last): | File "[...]/bitbake/lib/bb/command.py", line 99, in runAsyncCommand | commandmethod(self.cmds_async, self, options) | File "[...]/bitbake/lib/bb/command.py", line 405, in showEnvironment | command.cooker.showEnvironment(bfile) | File "[...]/bitbake/lib/bb/cooker.py", line 453, in showEnvironment | logger.plain("\npython %s () {\n%s}\n", e, data.getVar(e, envdata, 1)) | File "[...]/bitbake/lib/bb/data.py", line 89, in getVar | return d.getVar(var, exp) | File "[...]/bitbake/lib/bb/data_smart.py", line 522, in getVar | return self.getVarFlag(var, "_content", expand, noweakdefault) | File "[...]/bitbake/lib/bb/data_smart.py", line 612, in getVarFlag | value = self.expand(value, cachename) | File "[...]/bitbake/lib/bb/data_smart.py", line 350, in expand | return self.expandWithRefs(s, varname).value | File "[...]/bitbake/lib/bb/data_smart.py", line 340, in expandWithRefs | raise ExpansionError(varname, s, exc) | ExpansionError: Failure expanding variable can_delete_FILESPATH, expression was def can_delete_FILESPATH(cfgdata, d): | expected = cfgdata.get("FILESPATH") | #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}" | expectedpaths = d.expand(expected) | unexpanded = d.getVar("FILESPATH", 0) | filespath = d.getVar("FILESPATH", True).split(":") | filespath = [os.path.normpath(f) for f in filespath if os.path.exists(f)] | for fp in filespath: | if not fp in expectedpaths: | # __note("Path %s in FILESPATH not in the expected paths %s" % | # (fp, expectedpaths), d) | return False | return expected != unexpanded | which triggered exception AttributeError: 'NoneType' object has no attribute 'split' Removing the commented second line in can_delete_FILESPATH() hides the error. (From OE-Core rev: a84c36e0e5e8332ddc5a6c34e1f598d5cb87cee2) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/recipe_sanity.bbclass')
-rw-r--r--meta/classes/recipe_sanity.bbclass1
1 files changed, 0 insertions, 1 deletions
diff --git a/meta/classes/recipe_sanity.bbclass b/meta/classes/recipe_sanity.bbclass
index 5dd4624f40..ee04e333db 100644
--- a/meta/classes/recipe_sanity.bbclass
+++ b/meta/classes/recipe_sanity.bbclass
@@ -59,7 +59,6 @@ def can_use_autotools_base(cfgdata, d):
59 59
60def can_delete_FILESPATH(cfgdata, d): 60def can_delete_FILESPATH(cfgdata, d):
61 expected = cfgdata.get("FILESPATH") 61 expected = cfgdata.get("FILESPATH")
62 #expected = "${@':'.join([os.path.normpath(os.path.join(fp, p, o)) for fp in d.getVar('FILESPATHBASE', True).split(':') for p in d.getVar('FILESPATHPKG', True).split(':') for o in (d.getVar('OVERRIDES', True) + ':').split(':') if os.path.exists(os.path.join(fp, p, o))])}:${FILESDIR}"
63 expectedpaths = d.expand(expected) 62 expectedpaths = d.expand(expected)
64 unexpanded = d.getVar("FILESPATH", 0) 63 unexpanded = d.getVar("FILESPATH", 0)
65 filespath = d.getVar("FILESPATH", True).split(":") 64 filespath = d.getVar("FILESPATH", True).split(":")