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 V2] Add file information to package information window
Date: Wed, 03 Apr 2013 17:18:07 +0100 [thread overview]
Message-ID: <1912854.rCCW1yQxSL@helios> (raw)
In-Reply-To: <1365003047-10522-1-git-send-email-andrei.adrianx.dinu@intel.com>
Hi Andrei,
On Wednesday 03 April 2013 18:30:47 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 | 10 ++++++++++
> meta/classes/packageinfo.bbclass | 20 --------------------
> 2 files changed, 10 insertions(+), 20 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 3479947..cafe339 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1130,6 +1130,13 @@ python emit_pkgdata() {
> workdir = d.getVar('WORKDIR', True)
>
> for pkg in packages.split():
> + items = {}
> + for files_list in pkgfiles[pkg]:
> + if
> files_list.split(files_list.split('/')[len(files_list.split('/'))-1])[0][:-
> 1] not in items: +
> items[files_list.split(files_list.split('/')[len(files_list.split('/'))-1])
> [0][:-1]] = [] +
> items[files_list.split(files_list.split('/')[len(files_list.split('/'))-1])
> [0][:-1]].append(files_list.split('/')[len(files_list.split('/'))-1]) +
> else:
> +
> items[files_list.split(files_list.split('/')[len(files_list.split('/'))-1])
> [0][:-1]].append(files_list.split('/')[len(files_list.split('/'))-1])
> subdata_file = pkgdatadir + "/runtime/%s" % pkg
I'd recommend the use of os.path.basename() here; additionally rather than
repeating the same call several times (possibly expensive within a loop),
assign the return value to a variable and then use that instead.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-04-03 16:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 15:30 [PATCH V2] Add file information to package information window Andrei Dinu
2013-04-03 16:18 ` Paul Eggleton [this message]
2013-04-04 8:22 ` 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=1912854.rCCW1yQxSL@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