* [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies
@ 2014-12-24 16:32 Otavio Salvador
2014-12-24 16:32 ` [PATCH v2 2/3] image_types.bbclass: Rework code to map types for 'ext3' Otavio Salvador
2014-12-24 16:32 ` [PATCH v2 3/3] lib/oe/image.py: Handle compressed IMAGE_TYPEDEP values Otavio Salvador
0 siblings, 2 replies; 6+ messages in thread
From: Otavio Salvador @ 2014-12-24 16:32 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
The IMAGE_TYPEDEP dependencies also need to be taken into account when
building an IMAGE_FSTYPE.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/classes/image_types.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 1b8ceee..71b2ea9 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -21,6 +21,8 @@ def imagetypes_getdepends(d):
basetype = type[:-len("." + ctype)]
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
break
+ for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
+ adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
depstr = ""
--
2.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v2 2/3] image_types.bbclass: Rework code to map types for 'ext3'
2014-12-24 16:32 [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies Otavio Salvador
@ 2014-12-24 16:32 ` Otavio Salvador
2014-12-24 16:32 ` [PATCH v2 3/3] lib/oe/image.py: Handle compressed IMAGE_TYPEDEP values Otavio Salvador
1 sibling, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2014-12-24 16:32 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/classes/image_types.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 71b2ea9..02b107c 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -13,7 +13,7 @@ def imagetypes_getdepends(d):
deps = []
ctypes = d.getVar('COMPRESSIONTYPES', True).split()
for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
- if type == "vmdk" or type == "live" or type == "iso" or type == "hddimg":
+ if type in ["vmdk", "live", "iso", "hddimg"]:
type = "ext3"
basetype = type
for ctype in ctypes:
--
2.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v2 3/3] lib/oe/image.py: Handle compressed IMAGE_TYPEDEP values
2014-12-24 16:32 [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies Otavio Salvador
2014-12-24 16:32 ` [PATCH v2 2/3] image_types.bbclass: Rework code to map types for 'ext3' Otavio Salvador
@ 2014-12-24 16:32 ` Otavio Salvador
1 sibling, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2014-12-24 16:32 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
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>
---
meta/lib/oe/image.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 7e080b0..f9c8f84 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]
--
2.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies
@ 2014-12-09 21:07 Otavio Salvador
2014-12-24 8:46 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2014-12-09 21:07 UTC (permalink / raw)
To: OpenEmbedded Core Mailing List; +Cc: Otavio Salvador
The IMAGE_TYPEDEP dependencies also need to be taken into account when
building an IMAGE_FSTYPE.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/classes/image_types.bbclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 9aee745..24e4bbb 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -21,6 +21,8 @@ def imagetypes_getdepends(d):
basetype = type[:-len("." + ctype)]
adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
break
+ for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
+ adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
depstr = ""
--
2.1.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies
2014-12-09 21:07 [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies Otavio Salvador
@ 2014-12-24 8:46 ` Richard Purdie
2014-12-24 16:32 ` Otavio Salvador
0 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2014-12-24 8:46 UTC (permalink / raw)
To: Otavio Salvador; +Cc: OpenEmbedded Core Mailing List
On Tue, 2014-12-09 at 19:07 -0200, Otavio Salvador wrote:
> The IMAGE_TYPEDEP dependencies also need to be taken into account when
> building an IMAGE_FSTYPE.
>
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
> meta/classes/image_types.bbclass | 2 ++
> 1 file changed, 2 insertions(+)
According to my tests, something in this patch series is causing:
https://autobuilder.yoctoproject.org/main/builders/minnow/builds/137/steps/BuildImages/logs/stdio
https://autobuilder.yoctoproject.org/main/builders/minnow-lsb/builds/138/steps/BuildImages/logs/stdio
https://autobuilder.yoctoproject.org/main/builders/nightly-x86/builds/137/steps/BuildImages_1/logs/stdio
https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64/builds/138/steps/BuildImages_1/logs/stdio
https://autobuilder.yoctoproject.org/main/builders/nightly-x86-lsb/builds/138/steps/BuildImages_1/logs/stdio
I could reproduce locally just by building anything with a live image
type and executing do_bootimg. It appears the ".gz" version of the
initramfs isn't created. You have to force stamps to get the code to
rerun.
Cheers,
Richard
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index 9aee745..24e4bbb 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -21,6 +21,8 @@ def imagetypes_getdepends(d):
> basetype = type[:-len("." + ctype)]
> adddep(d.getVar("COMPRESS_DEPENDS_%s" % ctype, True), deps)
> break
> + for typedepends in (d.getVar("IMAGE_TYPEDEP_%s" % basetype, True) or "").split():
> + adddep(d.getVar('IMAGE_DEPENDS_%s' % typedepends, True) , deps)
> adddep(d.getVar('IMAGE_DEPENDS_%s' % basetype, True) , deps)
>
> depstr = ""
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies
2014-12-24 8:46 ` Richard Purdie
@ 2014-12-24 16:32 ` Otavio Salvador
0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2014-12-24 16:32 UTC (permalink / raw)
To: Richard Purdie; +Cc: OpenEmbedded Core Mailing List
Hello Richard,
On Wed, Dec 24, 2014 at 6:46 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Tue, 2014-12-09 at 19:07 -0200, Otavio Salvador wrote:
>> The IMAGE_TYPEDEP dependencies also need to be taken into account when
>> building an IMAGE_FSTYPE.
>>
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>> meta/classes/image_types.bbclass | 2 ++
>> 1 file changed, 2 insertions(+)
>
> According to my tests, something in this patch series is causing:
>
> https://autobuilder.yoctoproject.org/main/builders/minnow/builds/137/steps/BuildImages/logs/stdio
> https://autobuilder.yoctoproject.org/main/builders/minnow-lsb/builds/138/steps/BuildImages/logs/stdio
> https://autobuilder.yoctoproject.org/main/builders/nightly-x86/builds/137/steps/BuildImages_1/logs/stdio
> https://autobuilder.yoctoproject.org/main/builders/nightly-x86-64/builds/138/steps/BuildImages_1/logs/stdio
> https://autobuilder.yoctoproject.org/main/builders/nightly-x86-lsb/builds/138/steps/BuildImages_1/logs/stdio
>
> I could reproduce locally just by building anything with a live image
> type and executing do_bootimg. It appears the ".gz" version of the
> initramfs isn't created. You have to force stamps to get the code to
> rerun.
I could reproduce the issue using the 'genericx86' machine.
After some investigation the culprit for the issue has been found.
When I changed the code to account for the base type dependency, I
mistakenly changed the node to use.
So the fix was easy: http://privatepaste.com/4389a3a857
Thanks for the detailed report, this made my life easier when trying
to reproduce the failing case. I have successfully build
core-image-minimal for 'genericx86' and 'imx6qsabresd' machines. The
last was the one which raised the need of base type dependency rework,
by the way.
I sent a v2 patchset with this fixed.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-12-24 16:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-24 16:32 [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies Otavio Salvador
2014-12-24 16:32 ` [PATCH v2 2/3] image_types.bbclass: Rework code to map types for 'ext3' Otavio Salvador
2014-12-24 16:32 ` [PATCH v2 3/3] lib/oe/image.py: Handle compressed IMAGE_TYPEDEP values Otavio Salvador
-- strict thread matches above, loose matches on Subject: below --
2014-12-09 21:07 [PATCH v2 1/3] image_types.bbclass: Respect IMAGE_TYPEDEP dependencies Otavio Salvador
2014-12-24 8:46 ` Richard Purdie
2014-12-24 16:32 ` Otavio Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox