Commit Graph

7 Commits

Author SHA1 Message Date
Aníbal Limón
cb6f6b50d0 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>
2017-01-05 15:21:50 -06:00
Paul Eggleton
410569a701 update_layer.py: fix up for bitbake API change
The multiconfig changes broke the calls here to loadDataFull(). To avoid
this being an issue in future, make use of tinfoil's new parse_recipe_file()
function (if available) to isolate the code here from any future changes to
bitbake's internal code.

Part of the fix for [YOCTO #10192].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-01-04 14:16:12 -06:00
Aníbal Limón
33110335d2 layerindex: Fix recipe loading using tinfoil
Due to enablement of the Bitbake multiconfiguration
builds now the bb.cache requires an instance to load
a recipe.

This changes adds an instance of the databuilder and
cache to tinfoil, in the future we need to provide a
method for get data from the recipe at tinfoil level.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-08-29 16:12:04 -05:00
Paul Eggleton
3d6dc8f35a update_layer.py: use new-style transaction API
The old transaction API has been removed in Django 1.8 and was
deprecated at 1.6. There's no explicit open transaction, commit or
rollback now - we just wrap the layer operations in
"with transaction.atomic()"; if we need to roll back we just raise a
"dummy" exception.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:39:11 -05:00
Paul Eggleton
72fcee545a update_layer.py: fix handling of renames with newer GitPython
Newer versions of GitPython implement rename detection, which means that
such changes don't show up as adds and deletes anymore and you get a
bunch of ENOENT errors for renamed files. Add some code to explicitly
look for renames and process them appropriately.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:38:50 -05:00
Paul Eggleton
cfc911a254 update_layer.py: rename confusing loop variables
Stop using "d" (sometimes multiple levels!) and use proper descriptive
variable names instead.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:38:50 -05:00
Paul Eggleton
0d642c525a update.py: refactor into two separate scripts
In order to try to avoid problems with leaking memory, context bleeding
from one layer to another, and lay the groundwork for supporting
updating all branches in one operation, split the updating of a single
layer out to its own internal script. This means that the tinfoil
instantiation and metadata parsing is in a completely separate process
per layer.

Implements [YOCTO #9647].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-22 16:35:49 -05:00