aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2014-12-24 14:32:11 -0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-24 17:48:56 +0000
commit6e7d1de6cc99ed2def346dc40310573f5f0ce5ca (patch)
tree33cd0e2048dfc832b3ee1c83b1493c582a4e649b
parentdf00cb53f0548d34e5865b6fff314bff641af6e7 (diff)
downloadopenembedded-core-contrib-6e7d1de6cc99ed2def346dc40310573f5f0ce5ca.tar.gz
lib/oe/image.py: Handle compressed IMAGE_TYPEDEP values
When computing the dependency graph for the image generation, we need to take into account the compression type and identify the base type it relates to. This allow for a more robust graph generation even when using composed image types. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oe/image.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 7e080b00dd..f9c8f84cf8 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -48,11 +48,13 @@ class ImageDepGraph(object):
graph = dict()
def add_node(node):
+ base_type = self._image_base_type(node)
deps = (self.d.getVar('IMAGE_TYPEDEP_' + node, True) or "")
- if deps != "":
+ base_deps = (self.d.getVar('IMAGE_TYPEDEP_' + base_type, True) or "")
+ if deps != "" or base_deps != "":
graph[node] = deps
- for dep in deps.split():
+ for dep in deps.split() + base_deps.split():
if not dep in graph:
add_node(dep)
else:
@@ -72,6 +74,18 @@ class ImageDepGraph(object):
for item in remove_list:
self.graph.pop(item, None)
+ def _image_base_type(self, type):
+ ctypes = self.d.getVar('COMPRESSIONTYPES', True).split()
+ if type in ["vmdk", "live", "iso", "hddimg"]:
+ type = "ext3"
+ basetype = type
+ for ctype in ctypes:
+ if type.endswith("." + ctype):
+ basetype = type[:-len("." + ctype)]
+ break
+
+ return basetype
+
def _compute_dependencies(self):
"""
returns dict object of nodes with [no_of_depends_on, no_of_depended_by]