layerindex: Update tinfoil to call shutdown method

The new client/server API of tinfoil requires explicit call of
shutdown method to send the event for finalize cooker process.

Also in update_layer remove the databuilder and cache instance
now isn't needed.

[YOCTO #10863]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
This commit is contained in:
Aníbal Limón 2017-01-05 15:17:03 -06:00
parent c1ba5f65f1
commit cb6f6b50d0
5 changed files with 5 additions and 6 deletions

View File

@ -231,6 +231,7 @@ def main():
outp = generate_patches(tinfoil, fetchdir, changeset, sys.argv[2])
finally:
tinfoil.shutdown()
utils.unlock_file(lockfile)
if outp:

View File

@ -89,6 +89,8 @@ def main():
except Exception as e:
logger.info("Unable to read %s: %s", fullpath, str(e))
tinfoil.shutdown()
sys.exit(0)

View File

@ -34,12 +34,6 @@ def _setup_tinfoil(bitbakepath, enable_tracking):
tinfoil.cooker.enableDataTracking()
tinfoil.prepare(config_only = True)
# XXX: Setup databuilder
tinfoil.databuilder = bb.cookerdata.CookerDataBuilder(tinfoil.config)
tinfoil.databuilder.parseBaseConfiguration()
tinfoil.cache = bb.cache.NoCache(tinfoil.databuilder)
return tinfoil
def _parse_layer_conf(layerdir, data):

View File

@ -201,6 +201,7 @@ def main():
transaction.rollback()
finally:
transaction.leave_transaction_management()
tinfoil.shutdown()
shutil.rmtree(tempdir)
sys.exit(0)

View File

@ -611,6 +611,7 @@ def main():
import traceback
traceback.print_exc()
tinfoil.shutdown()
shutil.rmtree(tempdir)
sys.exit(0)