Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Chong Lu <Chong.Lu@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 3/3] oelint.bbclass: Check for ${PN} or ${P} usage
Date: Fri, 1 Aug 2014 03:37:41 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.11.1408010337001.31066@localhost> (raw)
In-Reply-To: <26c2d48cccb6fb2dfe6dd00dbb4ab191b7bd2b4d.1406876955.git.Chong.Lu@windriver.com>

On Fri, 1 Aug 2014, Chong Lu wrote:

> Check for ${PN} or ${P} usage in SRC_URI or S.
> We should use ${BPN} or ${BP} instead to avoid breaking multilib.
>
> [YOCTO #5427]
>
> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> ---
>  meta/classes/oelint.bbclass | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass
> index 0bed74a..685a88d 100644
> --- a/meta/classes/oelint.bbclass
> +++ b/meta/classes/oelint.bbclass
> @@ -62,4 +62,24 @@ python do_lint() {
>                      bb.warn("${PN}: %s doesn't have Signed-off-by" % item)
>                  if findKey(path, "Upstream-Status"):
>                      bb.warn("${PN}: %s doesn't have Upstream-Status" % item)
> +
> +
> +    ##############################
> +    # Check for ${PN} or ${P} usage in SRC_URI or S
> +    # Should use ${BPN} or ${BP} instead to avoid breaking multilib
> +    #
> +    s = d.getVar("SRC_URI").split()
> +
> +    for srcurl in s:
> +        if not srcurl.startswith("file://"):
> +            if not srcurl.find("{PN}") == -1:
> +                bb.warn("${PN}: Should use BPN instead to PN in SRC_URI")
> +            if not srcurl.find("{P}") == -1:

  should you not say, "use BPN instead of PN ..."?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



  reply	other threads:[~2014-08-01  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01  7:15 [PATCH 0/3] oelint.bbclass: make oelint bbclass work Chong Lu
2014-08-01  7:15 ` [PATCH 1/3] " Chong Lu
2014-08-01  7:15 ` [PATCH 2/3] oelint.bbclass: add patch checking Chong Lu
2014-08-01  7:15 ` [PATCH 3/3] oelint.bbclass: Check for ${PN} or ${P} usage Chong Lu
2014-08-01  7:37   ` Robert P. J. Day [this message]
2014-08-01  7:57     ` Chong Lu

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=alpine.LFD.2.11.1408010337001.31066@localhost \
    --to=rpjday@crashcourse.ca \
    --cc=Chong.Lu@windriver.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