[oe-commits] Otavio Salvador : lib/oe/image.py: Handle compressed IMAGE_TYPEDEP values
git at git.openembedded.org
git at git.openembedded.org
Tue Dec 23 11:47:40 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: bca8e6a7e4e345885207d9f601886c2698ff90d8
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=bca8e6a7e4e345885207d9f601886c2698ff90d8
Author: Otavio Salvador <otavio at ossystems.com.br>
Date: Tue Dec 9 19:07:57 2014 -0200
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 at ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/image.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 7e080b0..efc0329 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -48,6 +48,7 @@ class ImageDepGraph(object):
graph = dict()
def add_node(node):
+ node = self._image_base_type(node)
deps = (self.d.getVar('IMAGE_TYPEDEP_' + node, True) or "")
if deps != "":
graph[node] = deps
@@ -72,6 +73,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]
More information about the Openembedded-commits
mailing list