All of lore.kernel.org
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH] Switch insane.bbclass to endswith() and fix la/pc check
Date: Thu, 1 Apr 2010 18:25:52 -0700	[thread overview]
Message-ID: <20100402012552.GA6161@gmail.com> (raw)
In-Reply-To: <1270170658.7652.0.camel@trini-m4400>

On (01/04/10 18:10), Tom Rini wrote:
> This changes insane.bbclass to use s.endswith("str") rather than s[-3:]
> == "str".  The primary motivation for this is that we have tests that
> check for 'la' and 'pc' files when we really want '.la' and '.pc' to be
> what we check for.  Also, our -dev symlink test does if test1:  if test2
> and test3: action, when it could just be if test1 and test2 and test3.
> 
> Signed-off-by: Tom Rini <tom_rini@mentor.com>


Acked-by: Khem Raj <raj.khem@gmail.com>

> 
> diff --git a/classes/insane.bbclass b/classes/insane.bbclass
> index c2e8d9c..c85703e 100644
> --- a/classes/insane.bbclass
> +++ b/classes/insane.bbclass
> @@ -263,11 +263,10 @@ def package_qa_check_dev(path, name,d, elf):
>          if bb.data.inherits_class(s, d):
>              return True
>  
> -    if not "-dev" in name:
> -        if path[-3:] == ".so" and os.path.islink(path):
> -            error_msg = "non -dev package contains symlink .so: %s path
> '%s'" % \
> -                     (name, package_qa_clean_path(path,d))
> -            sane = package_qa_handle_error(0, error_msg, name, path, d)
> +    if not name.endswith("-dev") and path.endswith(".so") and
> os.path.islink(path):
> +        error_msg = "non -dev package contains symlink .so: %s path '%
> s'" % \
> +                 (name, package_qa_clean_path(path,d))
> +        sane = package_qa_handle_error(0, error_msg, name, path, d)
>  
>      return sane
>  
> @@ -412,7 +411,7 @@ def package_qa_check_staged(path,d):
>      for root, dirs, files in os.walk(path):
>          for file in files:
>              path = os.path.join(root,file)
> -            if file[-2:] == "la":
> +            if file.endswith(".la"):
>                  file_content = open(path).read()
>                  # Don't check installed status for native/cross
> packages
>                  if not iscrossnative:
> @@ -422,7 +421,7 @@ def package_qa_check_staged(path,d):
>                  if workdir in file_content:
>                      error_msg = "%s failed sanity test (workdir) in
> path %s" % (file,root)
>                      sane = package_qa_handle_error(8, error_msg,
> "staging", path, d)
> -            elif file[-2:] == "pc":
> +            elif file.endswith(".pc"):
>                  file_content = open(path).read()
>                  if pkgconfigcheck in file_content:
>                      error_msg = "%s failed sanity test (tmpdir) in path
> %s" % (file,root)
> 
> 
> -- 
> Tom Rini <tom_rini@mentor.com>
> Mentor Graphics Corporation
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel



  reply	other threads:[~2010-04-02  1:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02  1:10 [PATCH] Switch insane.bbclass to endswith() and fix la/pc check Tom Rini
2010-04-02  1:25 ` Khem Raj [this message]
2010-04-02  4:56   ` Marcin Juszkiewicz

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=20100402012552.GA6161@gmail.com \
    --to=raj.khem@gmail.com \
    --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.