Skip to contentSkip to conversation

devtool: package: don't try to initialise tinfoil twice

PATCH New Paul Eggleton 1 participant 2 messages Dec 14, 2016

lore
Share & tools
lore
#0 lore raw

cover devtool: package: don't try to initialise tinfoil twice

This patch is on top of the tinfoil2 set but doesn't actually require it - it fixes an issue that's been there for a while, it just slowed things down a bit instead of failing as it does with tinfoil2.

The following changes since commit 2eea6a65b009e9d47c03b7d82d2699f88228fc62:

oe-selftest: add basic tinfoil tests (2016-12-13 19:55:02 +1300)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib paule/tinfoil2-extra-fix
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/tinfoil2-extra-fix

Paul Eggleton (1):
devtool: package: don't try to initialise tinfoil twice

 scripts/lib/devtool/package.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 1 line
2.5.5
#1 lore raw

PATCH 1/1 devtool: package: don't try to initialise tinfoil twice

setup_tinfoil() already calls prepare(), we don't need to call it again ourselves and doing so with tinfoil2 results in "ERROR: Only one copy of bitbake should be run against a build directory". Calling prepare() twice should probably still be allowed, so that ought to be fixed separately, but in the mean time this code is still wrong so fix it here.

---
 scripts/lib/devtool/package.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
scripts/lib/devtool/package.py +1 -3
index afb5809..4764064 100644
@@ -28,10 +28,8 @@ def package(args, config, basepath, workspace):
     """Entry point for the devtool 'package' subcommand"""
     check_workspace_recipe(workspace, args.recipename)
 
-    tinfoil = setup_tinfoil(basepath=basepath)
+    tinfoil = setup_tinfoil(basepath=basepath, config_only=True)
     try:
-        tinfoil.prepare(config_only=True)
-
         image_pkgtype = config.get('Package', 'image_pkgtype', '')
         if not image_pkgtype:
             image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True)
Signature · 1 line
2.5.5