Patchwork classes/insane: fix libdir check regexes

login
register
mail settings
Submitter Paul Eggleton
Date July 3, 2013, 1:40 p.m.
Message ID <1372858838-17887-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/52887/
State New
Headers show

Comments

Paul Eggleton - July 3, 2013, 1:40 p.m.
* Ensure these do not pick up e.g. /lib/systemd/system/uuidd.socket
* Fix broken exec_re regex (lib*. -> lib.*)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/insane.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Ross Burton - July 3, 2013, 2:35 p.m.
On 3 July 2013 14:40, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> +    lib_re = re.compile("^/lib.*\.so[0-9.]*$")
> +    exec_re = re.compile("^%s.*/lib.*\.so[0-9.]*$" % exec_prefix)

I'd been meaning to double-check this assumption since the discussion
yesterday, and I'm glad I did.  My Debian machine has these files in
/usr/lib that don't match that regex:

libatlas.so.3gf
libblas.so.3gf
libcblas.so.3gf
libf77blas.so.3gf
liblapack_atlas.so.3gf
liblapack.so.3gf
libmozjs.so.10d
libnspr4.so.0d
libnss3.so.1d
libnssutil3.so.1d
libplc4.so.0d
libplds4.so.0d
libsmime3.so.1d
libssl3.so.1d

How about ^lib.+\.so(\..+)?$ to match a library filename?

Ross
Paul Eggleton - July 3, 2013, 3:09 p.m.
On Wednesday 03 July 2013 15:35:15 Burton, Ross wrote:
> On 3 July 2013 14:40, Paul Eggleton <paul.eggleton@linux.intel.com> wrote:
> > +    lib_re = re.compile("^/lib.*\.so[0-9.]*$")
> > +    exec_re = re.compile("^%s.*/lib.*\.so[0-9.]*$" % exec_prefix)
> 
> I'd been meaning to double-check this assumption since the discussion
> yesterday, and I'm glad I did.  My Debian machine has these files in
> /usr/lib that don't match that regex:
> 
> libatlas.so.3gf
> libblas.so.3gf
> libcblas.so.3gf
> libf77blas.so.3gf
> liblapack_atlas.so.3gf
> liblapack.so.3gf
> libmozjs.so.10d
> libnspr4.so.0d
> libnss3.so.1d
> libnssutil3.so.1d
> libplc4.so.0d
> libplds4.so.0d
> libsmime3.so.1d
> libssl3.so.1d
> 
> How about ^lib.+\.so(\..+)?$ to match a library filename?

Hmm, right. That looks reasonable. v2 sent.

Cheers,
Paul

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 27c225f..af419f1 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -265,8 +265,8 @@  def package_qa_check_libdir(d):
             full_path = os.path.join(root,file)
             my_files.append(full_path[len(pkgd):])
 
-    lib_re = re.compile("^/lib.*\.so")
-    exec_re = re.compile("^%s.*/lib*.\.so" % exec_prefix)
+    lib_re = re.compile("^/lib.*\.so[0-9.]*$")
+    exec_re = re.compile("^%s.*/lib.*\.so[0-9.]*$" % exec_prefix)
 
     for file in my_files:
         if lib_re.match(file):