From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hetzner.pbcl.net (mail.pbcl.net [88.198.119.4]) by mail.openembedded.org (Postfix) with ESMTP id 047C9605BB for ; Wed, 23 Mar 2016 18:03:54 +0000 (UTC) Received: from elite.brightsigndigital.co.uk ([213.210.30.29] helo=phil-desktop) by hetzner.pbcl.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ain8M-0005f8-Ri; Wed, 23 Mar 2016 19:03:55 +0100 Message-ID: <1458756234.3476.189.camel@pbcl.net> From: Phil Blundell To: "Burton, Ross" Date: Wed, 23 Mar 2016 18:03:54 +0000 In-Reply-To: References: <1458748461-4643-1-git-send-email-william.c.randle@intel.com> <1458755798.3476.186.camel@pbcl.net> X-Mailer: Evolution 3.18.3-1 Mime-Version: 1.0 Cc: OE-core Subject: Re: [PATCH] insane.bbclass: tighten lib_re and exec_re patterns to avoid false positive X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2016 18:03:55 -0000 Content-Type: multipart/alternative; boundary="=-MXc/9Iq9v01BNK7CnpjH" --=-MXc/9Iq9v01BNK7CnpjH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Wed, 2016-03-23 at 17:59 +0000, Burton, Ross wrote: > > On 23 March 2016 at 17:56, Phil Blundell wrote: > > > lib_re would match files like "/libsoletta.so.0.0.1-gdb.py" which > > are > > > not valid library filenames. > > > > What are the consequences of it matching things that are not > > libraries? > See #9215, the libdir sanity test fires when it shouldn't. > > WARNING: QA Issue: soletta-dbg: found library in wrong location: > /usr/share/gdb/auto-load/libsoletta.so.0.0.1-gdb.py [libdir] > > That's no library... Ah, right. I see. I wonder if we should just give insane.bbclass a whitelist of directories in which it should ignore apparently misplaced libraries.  There aren't likely to be many cases like that one. Or alternatively, add an extra check so that when it thinks it's found a misplaced library, it checks the ELF header to make sure that it really is one and suppresses the diagnostic if not.  If you only do this in cases where it was about to print a warning anyway then the impact on performance shouldn't be too bad. p. --=-MXc/9Iq9v01BNK7CnpjH Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: 7bit
On Wed, 2016-03-23 at 17:59 +0000, Burton, Ross wrote:

On 23 March 2016 at 17:56, Phil Blundell <pb@pbcl.net> wrote:
> lib_re would match files like "/libsoletta.so.0.0.1-gdb.py" which are
> not valid library filenames.

What are the consequences of it matching things that are not libraries?

See #9215, the libdir sanity test fires when it shouldn't.

WARNING: QA Issue: soletta-dbg: found library in wrong location: /usr/share/gdb/auto-load/libsoletta.so.0.0.1-gdb.py [libdir]

That's no library...

Ah, right. I see.

I wonder if we should just give insane.bbclass a whitelist of directories in which it should ignore apparently misplaced libraries.  There aren't likely to be many cases like that one.

Or alternatively, add an extra check so that when it thinks it's found a misplaced library, it checks the ELF header to make sure that it really is one and suppresses the diagnostic if not.  If you only do this in cases where it was about to print a warning anyway then the impact on performance shouldn't be too bad.

p.

--=-MXc/9Iq9v01BNK7CnpjH--