All of lore.kernel.org
 help / color / mirror / Atom feed
From: Radu Moisan <radu.moisan@intel.com>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH v2] insane.bbclass: add library dir sanity check
Date: Fri, 14 Sep 2012 12:18:22 +0300	[thread overview]
Message-ID: <5052F65E.4070704@intel.com> (raw)
In-Reply-To: <1347613438-22840-1-git-send-email-radu.moisan@intel.com>

Added comments.

radu

On 09/14/2012 12:03 PM, Radu Moisan wrote:
> Check in ${PKGD} for libraries in other locations
> then ${libdir}. Trigger a warning if so.
>
> [Yocto #2038]
>
> Signed-off-by: Radu Moisan <radu.moisan@intel.com>
> ---
>   meta/classes/insane.bbclass |   18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index e74eb3f..6388609 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -212,6 +212,18 @@ def package_qa_check_staticdev(path, name, d, elf, messages):
>           messages.append("non -staticdev package contains static .a library: %s path '%s'" % \
>                    (name, package_qa_clean_path(path,d)))
>   
> +def package_qa_check_libdir(path,libdir):
> +    """
> +    Check in path for libraries in other locations then libdir. Trigger a warning if so.
> +    """
> +    import re
> +    lib_re = re.compile("^.*\.(so|a)")
> +    for root, dirs, files in os.walk(path):
> +        if libdir not in root:
> +            for file in files:
> +                if lib_re.match(file):
> +                    bb.warn("Found library in wrong location: %s" % os.path.join(root,file))
> +
>   QAPATHTEST[debug-files] = "package_qa_check_dbg"
>   def package_qa_check_dbg(path, name, d, elf, messages):
>       """
> @@ -688,6 +700,12 @@ python do_package_qa () {
>               rdepends_sane = False
>   
>   
> +    ml = d.getVar("MLPREFIX", True) or ""
> +    if ml:
> +        pkgd = d.getVar('PKGD', True)
> +        libdir = d.getVar("libdir", True)
> +        package_qa_check_libdir(pkgd,libdir)
> +
>       if not walk_sane or not rdepends_sane:
>           bb.fatal("QA run found fatal errors. Please consider fixing them.")
>       bb.note("DONE with PACKAGE QA")




      reply	other threads:[~2012-09-14  9:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14  9:03 [PATCH v2] insane.bbclass: add library dir sanity check Radu Moisan
2012-09-14  9:18 ` Radu Moisan [this message]

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=5052F65E.4070704@intel.com \
    --to=radu.moisan@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 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.