Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH V3] Add file information to package information window
Date: Thu, 04 Apr 2013 11:02:53 +0100	[thread overview]
Message-ID: <10041023.xxs08iTcih@helios> (raw)
In-Reply-To: <1365063634-1766-1-git-send-email-andrei.adrianx.dinu@intel.com>

On Thursday 04 April 2013 11:20:34 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     |   12 ++++++++++++
>  meta/classes/packageinfo.bbclass |   20 --------------------
>  2 files changed, 12 insertions(+), 20 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 3479947..e859a65 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1130,6 +1130,15 @@ python emit_pkgdata() {
>      workdir = d.getVar('WORKDIR', True)
> 
>      for pkg in packages.split():
> +        items = {}
> +        for files_list in pkgfiles[pkg]:
> +             item_name = os.path.basename(files_list)
> +             item_path = files_list.split(os.path.basename(files_list))[0]
[:-1] 

There is os.path.dirname() for this as well; alternatively you could use 
os.path.split() to get both at the same time.

> +             if item_path not in items:
> +                 items[item_path] = []
> +                 items[item_path].append(item_name)
> +             else:
> +                 items[item_path].append(item_name)

This could be simplified to:
             if item_path not in items:
                 items[item_path] = []
             items[item_path].append(item_name)

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



  reply	other threads:[~2013-04-04 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-04  8:20 [PATCH V3] Add file information to package information window Andrei Dinu
2013-04-04 10:02 ` Paul Eggleton [this message]
2013-04-04 10:10   ` Andrei Dinu

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=10041023.xxs08iTcih@helios \
    --to=paul.eggleton@linux.intel.com \
    --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