aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/recipe_sanity.bbclass
AgeCommit message (Collapse)Author
2016-09-14meta: cleanup d.getVar(var, 0)Robert Yang
Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-21recipe_sanity.bbclass: skip DataSmart in recipe_sanity_eh()Robert Yang
Fixed: $ bitbake quilt -crecipe_sanity File "/path/to/poky/bitbake/lib/bb/siggen.py", line 261, in dump_sigtask p = pickle.dump(data, stream, -1) PicklingError: Can't pickle <COWDict Level: 1 Current Keys: 0>: attribute lookup bb.COW.C failed This is because of: cfgdata[k] = d.getVar(k, 0) If d.getVar(k, 0) is a DataSmart (for example, BB_ORIGENV), it won't have the attribute of bb.COW.C, so the error happend. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-23recipe_sanity.bbclass: avoid error when running 'bitbake -e'Andreas Oberritter
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. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-01meta: Don't use deprecated bitbake APIRichard Purdie
These have been deprecated for a long time, convert the remaining references to the correct modules and prepare for removal of the compatibility support from bitbake. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-26classes: Remove references to _remove in function names since this may ↵Richard Purdie
become a bitbake keyword There is a good chance we might want to support a bitbake operator "_remove" which works in a similar way to _append and _prepend. As such, we can't use those keywords in function or variable names. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-06-14classes/conf: Add eventmasks for event handlersRichard Purdie
Now that bitbake supports masking events for event handlers, lets use this so event handlers are only called for events they care about. This lets us simplify the code indentation a bit at least as well as mildly improving the event handling performance. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-18recipe_sanity: Don't bother checking LICENSEPhil Blundell
Since e3d7890cace71b0a57d2530bf615a58dcb46d96f or so, base.bbclass has considered invalid LICENSE settings to be a fatal error. This means we will never see them so there is no point checking for that. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2012-08-21meta/classes: Various python whitespace fixesRichard Purdie
It was pointed out we have a number of weird indentations in the python functions. This patch cleans up 3, 7 and other weird indentations for the core bbclass files. It also fixes some wierd (odd) shell function indentation which my searches picked up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19Remove a number of unneeded import os/bb callsRichard Purdie
The bb and os modules are always imported so having these extra import calls are a waste of space/execution time. They also set a bad example for people copy and pasting code so clean them up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-04meta/classes: Update recrdeptask fields for recursive dependency handling ↵Richard Purdie
changes in bitbake This also deletes the buildall task since I seen usecases for it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Replace bb.data.expand(xxx, d) -> d.expand(xxx)Richard Purdie
sed \ -e 's:bb.data.\(expand([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data.expand *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie
Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-14import recipe_sanity.bbclass from oe masterPhil Blundell
This is a verbatim copy of the corresponding class from oe master. Signed-off-by: Phil Blundell <philb@gnu.org>