* [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS
@ 2016-04-19 16:47 Richard Purdie
2016-05-05 15:47 ` Martin Jansa
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2016-04-19 16:47 UTC (permalink / raw)
To: openembedded-core
If you configure a bz2 debugfs, pbzip2-native currently isn't built.
This patch makes sure the dependencies are added.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index e2467bd..122e080 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -17,7 +17,9 @@ def imagetypes_getdepends(d):
deps = []
ctypes = d.getVar('COMPRESSIONTYPES', True).split()
- for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
+ fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
+ fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
+ for type in fstypes:
if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]:
type = "ext4"
basetype = type
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS
2016-04-19 16:47 [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS Richard Purdie
@ 2016-05-05 15:47 ` Martin Jansa
2016-05-05 15:55 ` Mark Hatle
0 siblings, 1 reply; 5+ messages in thread
From: Martin Jansa @ 2016-05-05 15:47 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 4498 bytes --]
On Tue, Apr 19, 2016 at 05:47:07PM +0100, Richard Purdie wrote:
> If you configure a bz2 debugfs, pbzip2-native currently isn't built.
> This patch makes sure the dependencies are added.
BTW: I've tried to enable IMAGE_GEN_DEBUGFS for first time as described in manual:
Build sysroot paths are now removed from debug symbol files. Removing these paths means that remote GDB using an unstripped build system sysroot will no longer work (although this was never documented to work). The supported method to accomplish something similar is to set IMAGE_GEN_DEBUGFS to "1", which will generate a companion debug image containing unstripped binaries and associated debug sources alongside the image.
and it fails with ugly exception, because IMAGE_FSTYPES_DEBUGFS isn't set by default.
It should either be mentioned in the manual or there should be some sane default for it.
meta/conf/local.conf.sample.extended shows example how to set it next to IMAGE_GEN_DEBUGFS,
people reading this sample may notice it, but the comment also says:
If IMAGE_FSTYPES_DEBUGFS is not defined, it defaults to IMAGE_FSTYPES.
which isn't true for some reason in my setup, looking at the code I don't see where it is supposed
to default to IMAGE_FSTYPES
if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split()
for t in debugfs_fstypes:
alltypes.append("debugfs_" + t)
Maybe the author meant that IMAGE_FSTYPES variable is set to IMAGE_FSTYPES_DEBUGFS
only when IMAGE_FSTYPES_DEBUGFS is set, but that still leaves that split()
causing parse failure.
debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True)
if debugfs_image_fstypes:
d.setVar('IMAGE_FSTYPES', debugfs_image_fstypes)
ERROR: /OE/build/wpb/webos-ports/meta-webos-ports/meta-luneos/recipes-core/images/luneos-image.bb: Error executing a python function in <code>:
The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 14, function: <module>
0010:__anon_38__OE_build_wpb_webos_ports_openembedded_core_meta_classes_rootfs_ipk_bbclass(d)
0011:__anon_113__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass(d)
0012:__anon_176__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass(d)
0013:__anon_146__OE_build_wpb_webos_ports_openembedded_core_meta_classes_siteinfo_bbclass(d)
*** 0014:__anon_439__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass(d)
File: '/OE/build/wpb/webos-ports/openembedded-core/meta/classes/image.bbclass', lineno: 322, function: __anon_439__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass
0318: typedeps = {}
0319:
0320: if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
0321: debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split()
*** 0322: for t in debugfs_fstypes:
0323: alltypes.append("debugfs_" + t)
0324:
0325: def _add_type(t):
0326: baset = _image_base_type(t)
Exception: AttributeError: 'NoneType' object has no attribute 'split'
ERROR: Failed to parse recipe: /OE/build/wpb/webos-ports/meta-webos-ports/meta-luneos/recipes-core/images/luneos-image.bb
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
> index e2467bd..122e080 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -17,7 +17,9 @@ def imagetypes_getdepends(d):
>
> deps = []
> ctypes = d.getVar('COMPRESSIONTYPES', True).split()
> - for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
> + fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
> + fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
> + for type in fstypes:
> if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]:
> type = "ext4"
> basetype = type
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS
2016-05-05 15:47 ` Martin Jansa
@ 2016-05-05 15:55 ` Mark Hatle
2016-05-06 11:23 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Mark Hatle @ 2016-05-05 15:55 UTC (permalink / raw)
To: Martin Jansa, Richard Purdie; +Cc: openembedded-core
On 5/5/16 10:47 AM, Martin Jansa wrote:
> On Tue, Apr 19, 2016 at 05:47:07PM +0100, Richard Purdie wrote:
>> If you configure a bz2 debugfs, pbzip2-native currently isn't built.
>> This patch makes sure the dependencies are added.
I thought this had been fixed.
IMAGE_FSTYPES_DEBUGFS -should- be set to default to:
IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}"
I usually set it to "tar.gz" myself.
So this is a bug, and we definitely need to fix it. :P
--Mark
> BTW: I've tried to enable IMAGE_GEN_DEBUGFS for first time as described in manual:
> Build sysroot paths are now removed from debug symbol files. Removing these paths means that remote GDB using an unstripped build system sysroot will no longer work (although this was never documented to work). The supported method to accomplish something similar is to set IMAGE_GEN_DEBUGFS to "1", which will generate a companion debug image containing unstripped binaries and associated debug sources alongside the image.
>
> and it fails with ugly exception, because IMAGE_FSTYPES_DEBUGFS isn't set by default.
>
> It should either be mentioned in the manual or there should be some sane default for it.
>
> meta/conf/local.conf.sample.extended shows example how to set it next to IMAGE_GEN_DEBUGFS,
> people reading this sample may notice it, but the comment also says:
> If IMAGE_FSTYPES_DEBUGFS is not defined, it defaults to IMAGE_FSTYPES.
> which isn't true for some reason in my setup, looking at the code I don't see where it is supposed
> to default to IMAGE_FSTYPES
>
> if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
> debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split()
> for t in debugfs_fstypes:
> alltypes.append("debugfs_" + t)
>
> Maybe the author meant that IMAGE_FSTYPES variable is set to IMAGE_FSTYPES_DEBUGFS
> only when IMAGE_FSTYPES_DEBUGFS is set, but that still leaves that split()
> causing parse failure.
>
> debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True)
> if debugfs_image_fstypes:
> d.setVar('IMAGE_FSTYPES', debugfs_image_fstypes)
>
> ERROR: /OE/build/wpb/webos-ports/meta-webos-ports/meta-luneos/recipes-core/images/luneos-image.bb: Error executing a python function in <code>:
>
> The stack trace of python calls that resulted in this exception/failure was:
> File: '<code>', lineno: 14, function: <module>
> 0010:__anon_38__OE_build_wpb_webos_ports_openembedded_core_meta_classes_rootfs_ipk_bbclass(d)
> 0011:__anon_113__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass(d)
> 0012:__anon_176__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass(d)
> 0013:__anon_146__OE_build_wpb_webos_ports_openembedded_core_meta_classes_siteinfo_bbclass(d)
> *** 0014:__anon_439__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass(d)
> File: '/OE/build/wpb/webos-ports/openembedded-core/meta/classes/image.bbclass', lineno: 322, function: __anon_439__OE_build_wpb_webos_ports_openembedded_core_meta_classes_image_bbclass
> 0318: typedeps = {}
> 0319:
> 0320: if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
> 0321: debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split()
> *** 0322: for t in debugfs_fstypes:
> 0323: alltypes.append("debugfs_" + t)
> 0324:
> 0325: def _add_type(t):
> 0326: baset = _image_base_type(t)
> Exception: AttributeError: 'NoneType' object has no attribute 'split'
>
> ERROR: Failed to parse recipe: /OE/build/wpb/webos-ports/meta-webos-ports/meta-luneos/recipes-core/images/luneos-image.bb
>
> Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
>
>
>>
>> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>>
>> diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
>> index e2467bd..122e080 100644
>> --- a/meta/classes/image_types.bbclass
>> +++ b/meta/classes/image_types.bbclass
>> @@ -17,7 +17,9 @@ def imagetypes_getdepends(d):
>>
>> deps = []
>> ctypes = d.getVar('COMPRESSIONTYPES', True).split()
>> - for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
>> + fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
>> + fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
>> + for type in fstypes:
>> if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]:
>> type = "ext4"
>> basetype = type
>>
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS
2016-05-05 15:55 ` Mark Hatle
@ 2016-05-06 11:23 ` Burton, Ross
2016-05-06 11:27 ` Burton, Ross
0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2016-05-06 11:23 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
On 5 May 2016 at 16:55, Mark Hatle <mark.hatle@windriver.com> wrote:
> I thought this had been fixed.
>
> IMAGE_FSTYPES_DEBUGFS -should- be set to default to:
>
> IMAGE_FSTYPES_DEBUGFS ?= "${IMAGE_FSTYPES}"
>
> I usually set it to "tar.gz" myself.
>
> So this is a bug, and we definitely need to fix it. :P
>
Nope, nothing in oe-core sets that. Can some at WR send a patch?
Ross
[-- Attachment #2: Type: text/html, Size: 831 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS
2016-05-06 11:23 ` Burton, Ross
@ 2016-05-06 11:27 ` Burton, Ross
0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2016-05-06 11:27 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
On 6 May 2016 at 12:23, Burton, Ross <ross.burton@intel.com> wrote:
> Nope, nothing in oe-core sets that. Can some at WR send a patch?
>
Never mind, just sent it using your example.
Ross
[-- Attachment #2: Type: text/html, Size: 566 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-06 11:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19 16:47 [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS Richard Purdie
2016-05-05 15:47 ` Martin Jansa
2016-05-05 15:55 ` Mark Hatle
2016-05-06 11:23 ` Burton, Ross
2016-05-06 11:27 ` Burton, Ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox