]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/image.py: add image dependency mechanism
authorLaurentiu Palcu <laurentiu.palcu@intel.com>
Tue, 18 Feb 2014 13:49:44 +0000 (15:49 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Feb 2014 14:28:04 +0000 (14:28 +0000)
commitdb9dd4b4ef9120baccbccae77d9c31f54a6eb9a1
tree53749caf7da64b58e4706aa45cde178a22004d95
parent5e2796aa28e02ae3a076c6593c6533753720b13d
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@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/lib/oe/image.py