oeqa/devtool: Avoid unbound variable errors
PATCH 1/2 oeqa/devtool: Avoid unbound variable errors
inherits can be unset resulting in:
UnboundLocalError: local variable 'inherits' referenced before assignment
which can mask real errors. Avoid this.
Signed-off-by Richard Purdie <[email protected]>
--- meta/lib/oeqa/selftest/cases/devtool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/lib/oeqa/selftest/cases/devtool.py +2 -1
@@ -137,6 +137,7 @@ class DevtoolBase(OESelftestTestCase): with open(recipefile, 'r') as f: invar = None invalue = None + inherits = set() for line in f: var = None if invar:
@@ -158,7 +159,7 @@ class DevtoolBase(OESelftestTestCase): invar = var continue elif line.startswith('inherit '): - inherits = line.split()[1:] + inherits.update(line.split()[1:]) if var and var in checkvars: needvalue = checkvars.pop(var)
Signature · 1 line
2.20.1
PATCH 2/2 recipetool/create: Fix to work with reproducible_builds
The extra diretory created by reproducibile_builds was confusing recipetool and hence devtool. Ignore this directory to restore the correct behaviour and allow it to work with the class.
Signed-off-by Richard Purdie <[email protected]>
--- scripts/lib/recipetool/create.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/lib/recipetool/create.py +1 -1
@@ -496,7 +496,7 @@ def create_recipe(args): logger.info('Fetch temp directory is %s' % ftmpdir) dirlist = os.listdir(srctree) - filterout = ['git.indirectionsymlink'] + filterout = ['git.indirectionsymlink', 'source-date-epoch'] dirlist = [x for x in dirlist if x not in filterout] logger.debug('Directory listing (excluding filtered out):\n %s' % '\n '.join(dirlist)) if len(dirlist) == 1:
Signature · 1 line
2.20.1