Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] Add file information to package information window
Date: Wed, 03 Apr 2013 14:30:45 +0100	[thread overview]
Message-ID: <1364995845.6526.20.camel@ted> (raw)
In-Reply-To: <1364990305-20807-1-git-send-email-andrei.adrianx.dinu@intel.com>

On Wed, 2013-04-03 at 14:58 +0300, Andrei Dinu wrote:
> Removed the package files parsing routine from the
> packageinfo.bbclass file and added it to the
> package.bbclass file.
> 
> Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
> ---
>  meta/classes/package.bbclass     |   14 ++++++++++++++
>  meta/classes/packageinfo.bbclass |   20 --------------------
>  2 files changed, 14 insertions(+), 20 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 3479947..121a1dd 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1130,6 +1130,17 @@ python emit_pkgdata() {
>      workdir = d.getVar('WORKDIR', True)
>  
>      for pkg in packages.split():
> +        pkgdest = d.getVar('PKGDEST', True)
> +        files_path = pkgdest + '/' + pkg
> +        if os.path.exists(files_path):
> +                items = {}
> +                for path, dirs, files in os.walk(files_path):
> +                        files_list = []
> +                        if os.listdir(path) != []:
> +                            for f in files:
> +                                files_list.append(f)
> +                        if len(files_list) != 0:
> +                            items[path] = files_list           
>          subdata_file = pkgdatadir + "/runtime/%s" % pkg

You're now doing this in a "fastpath" so we need to look carefully at
performance here. Can you have a look at the pkgfiles[pkg] variable and
see if you can get the data you need from that? You should be able to
iterate it and just strip out the prefixes?

Cheers,

Richard





      reply	other threads:[~2013-04-03 13:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03 11:58 [PATCH] Add file information to package information window Andrei Dinu
2013-04-03 13:30 ` Richard Purdie [this message]

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=1364995845.6526.20.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=andrei.adrianx.dinu@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox