All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: mariano.lopez@linux.intel.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCHv2 2/6] license.bbclass: Added get_boot_dependencies function
Date: Tue, 10 Nov 2015 10:28:57 +0000	[thread overview]
Message-ID: <5525899.qQeO2PZXPI@peggleto-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <94f00319ebc710b27356de8c8ce8b7f48f1ad2c8.1447077439.git.mariano.lopez@linux.intel.com>

Hi Mariano,

On Monday 09 November 2015 14:04:39 mariano.lopez@linux.intel.com wrote:
> From: Mariano Lopez <mariano.lopez@linux.intel.com>
> 
> This function gets the dependencies from the classes that
> create a boot image, this is required because sometimes
> the bootloader dependecy is in these classes. The current
> classes covered are bootimg and bootdirectdisk because
> these are the only clases that add dependencies.
> 
> [YOCTO #6772]
> 
> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
> ---
>  meta/classes/license.bbclass | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
> 
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index 98f1733..d1bfe61 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -49,6 +49,37 @@ python license_create_manifest() {
>      write_license_files(d, rootfs_license_manifest, pkg_dic)
>  }
> 
> +def get_boot_dependencies(d):
> +    """ Return the dependencies from boot tasks """
> +
> +    depends = ""
> +    boot_depends_string = ""
> +    taskdepdata = d.getVar("BB_TASKDEPDATA", True)
> +    # Only bootimg and bootdirectdisk include the depends flag
> +    boot_tasks = ["do_bootimg", "do_bootdirectdisk",]
> +
> +    for task in boot_tasks:
> +        boot_depends_string = "%s %s" % (boot_depends_string,
> +                d.getVarFlag(task, "depends", True) or "")
> +    boot_depends = [dep.split(":")[0] for dep
> +                in boot_depends_string.split()
> +                if not dep.split(":")[0].endswith("-native")]
> +    for dep in boot_depends:
> +        pkgs_file = os.path.join(d.getVar('PKGDATA_DIR', True), dep)
> +        # If the package and dependency name is the same
> +        if os.path.exists(pkgs_file):
> +            depends = "%s %s" % (depends, dep)
> +        # We need to search for the provider of the dependency
> +        else:
> +            for taskdep in taskdepdata.itervalues():
> +                # The fifth field contains what the task provides
> +                if dep in taskdep[4]:
> +                    pkgs_file = os.path.join(d.getVar('PKGDATA_DIR', True),
> taskdep[0]) 
> +                    if os.path.isfile(pkgs_file):
> +                        depends = "%s %s" % (depends, taskdep[0])
> +                        break

Can you explain what you're getting out of looking into PKGDATA_DIR here? I'm 
not sure this is correct.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


  reply	other threads:[~2015-11-10 10:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 14:04 [PATCHv2 0/6] Create image manifest mariano.lopez
2015-11-09 14:04 ` [PATCHv2 1/6] license.bbclass: Split license create manifest mariano.lopez
2015-11-09 14:04 ` [PATCHv2 2/6] license.bbclass: Added get_boot_dependencies function mariano.lopez
2015-11-10 10:28   ` Paul Eggleton [this message]
2015-11-09 14:04 ` [PATCHv2 3/6] license.bbclass: Added function get_deployed_dependencies mariano.lopez
2015-11-09 14:04 ` [PATCHv2 4/6] license.bbclass: Added get_package_from_deployed mariano.lopez
2015-11-09 14:04 ` [PATCHv2 5/6] license.bbclass: Add function get_deployed_files mariano.lopez
2015-11-10 10:32   ` Paul Eggleton
2015-11-09 14:04 ` [PATCHv2 6/6] license.bbclass: Create image license manifest mariano.lopez
2015-11-10 10:42   ` Paul Eggleton
2015-11-10 14:52     ` Mariano Lopez
2015-11-11 17:32       ` Paul Eggleton

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=5525899.qQeO2PZXPI@peggleto-mobl.ger.corp.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=mariano.lopez@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.