[oe-commits] Laurentiu Palcu : lib/oe/image.py: add image dependency mechanism

git at git.openembedded.org git at git.openembedded.org
Thu Feb 20 14:22:25 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: db9dd4b4ef9120baccbccae77d9c31f54a6eb9a1
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=db9dd4b4ef9120baccbccae77d9c31f54a6eb9a1

Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date:   Tue Feb 18 15:49:44 2014 +0200

lib/oe/image.py: add image dependency mechanism

This commit adds a dependency mechanism to image creation, so that we can
split the images creation execution in groups, that can be executed in
parallel, having the dependencies satisfied in the same time. The old
code didn't need this since everything was serialized.

Technically, it adds a dependency graph topological sort class that the
main Image class can use to sort out the dependencies.

Images that have dependencies have to declare them using the NEW
IMAGE_TYPEDEP variable, like in the example below:

For:
IMAGE_FSTYPES = "i1 i2 i3 i4 i5"
IMAGE_TYPEDEP_i4 = "i2"
IMAGE_TYPEDEP_i5 = "i6 i4"
IMAGE_TYPEDEP_i6 = "i7"
IMAGE_TYPEDEP_i7 = "i2"

We'll get the following image groups, sorted out by their dependencies:

[['i1', 'i3', 'i2'], ['i4', 'i7'], ['i6'], ['i5']]

The algorithm can probably be optimized but, given the small size of the
graphs, it'll do.

[YOCTO #5830]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/lib/oe/image.py | 282 ++++++++++++++++++++++++++++++++++-----------------
 1 file changed, 191 insertions(+), 91 deletions(-)

Diff:   http://git.openembedded.org/?p=openembedded-core.git/?a=commitdiff;h=db9dd4b4ef9120baccbccae77d9c31f54a6eb9a1


More information about the Openembedded-commits mailing list