Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS
Date: Thu, 5 May 2016 17:47:48 +0200	[thread overview]
Message-ID: <20160505154748.GA23370@jama> (raw)
In-Reply-To: <1461084427.31320.25.camel@linuxfoundation.org>

[-- 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 --]

  reply	other threads:[~2016-05-05 15:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19 16:47 [PATCH] image_types: Ensure rootfs dependencies cover DEBUGFS Richard Purdie
2016-05-05 15:47 ` Martin Jansa [this message]
2016-05-05 15:55   ` Mark Hatle
2016-05-06 11:23     ` Burton, Ross
2016-05-06 11:27       ` Burton, Ross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160505154748.GA23370@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox