From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: openembedded-commits@lists.openembedded.org
Subject: Re: [oe-commits] Robert Yang : insane.bbclass: make package_qa_clean_path return a relative path
Date: Thu, 24 Sep 2015 07:54:44 +0200 [thread overview]
Message-ID: <20150924055444.GA2404@jama> (raw)
In-Reply-To: <20150923211259.12BA050583@opal.openembedded.org>
[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]
On Wed, Sep 23, 2015 at 09:12:59PM +0000, git@git.openembedded.org wrote:
> Module: openembedded-core.git
> Branch: master-next
> Commit: 67a1e4b087a39db04370685616d5b439b0f2b505
> URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=67a1e4b087a39db04370685616d5b439b0f2b505
>
> Author: Robert Yang <liezhi.yang@windriver.com>
> Date: Tue Sep 15 19:28:48 2015 -0700
>
> insane.bbclass: make package_qa_clean_path return a relative path
>
> Make package_qa_clean_path() return something like "work/path/to/file"
> rather than "/work/path/to/file", the relative path is a little clear.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> ---
>
> meta/classes/insane.bbclass | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index 72120f5..05e31a7 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -167,7 +167,7 @@ def package_qa_get_machine_dict():
>
> def package_qa_clean_path(path,d):
> """ Remove the common prefix from the path. In this case it is the TMPDIR"""
> - return path.replace(d.getVar('TMPDIR',True),"")
> + return path.replace(d.getVar("TMPDIR", True) + "/", "")
Isn't path[len(d.getVar("TMPDIR", True))+1:] a bit faster and safer in
cases where the TMPDIR path is included multiple times?
Or is this function meant to be used also for path which doesn't start
with TMPDIR? Then I agree it should stay replace, but maybe with
maxreplace parameter set to 1.
Same problem with "absolute" path is other QA check I was recently
changing (and I've kept leading / after seeing it somewhere else :)).
Regards,
>
> def package_qa_write_error(type, error, d):
> logfile = d.getVar('QA_LOGFILE', True)
>
> --
> _______________________________________________
> Openembedded-commits mailing list
> Openembedded-commits@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-commits
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
parent reply other threads:[~2015-09-24 5:54 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20150923211259.12BA050583@opal.openembedded.org>]
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=20150924055444.GA2404@jama \
--to=martin.jansa@gmail.com \
--cc=openembedded-commits@lists.openembedded.org \
--cc=openembedded-devel@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.