Patchwork [RFC] SHLIBSSEARCHDIRS

login
register
mail settings
Submitter Martin Jansa
Date July 6, 2013, 11:15 p.m.
Message ID <1373152554-22840-1-git-send-email-Martin.Jansa@gmail.com>
Download mbox | patch
Permalink /patch/53243/
State Not Applicable, archived
Headers show

Comments

Martin Jansa - July 6, 2013, 11:15 p.m.
---
 meta/classes/package.bbclass | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
Martin Jansa - July 6, 2013, 11:17 p.m.
On Sun, Jul 07, 2013 at 01:15:54AM +0200, Martin Jansa wrote:
> ---
>  meta/classes/package.bbclass | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)

Ignore this one, wrong git revision passed to send-email..

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 3f2deca..55035b5 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1322,11 +1322,18 @@  python package_do_shlibs() {
     libdir_re = re.compile(".*/%s$" % d.getVar('baselib', True))
     
     shlibs_search_dirs = d.getVar('SHLIBSSEARCHDIRS', True)
-    for dir in shlibs_search_dirs:
+    shlibs_search_dirs_re_txt = ""
+    for dir in shlibs_search_dirs.split(' '):
+        # strip leading and trailing slash, it's added in regexp
+        if dir.endswith("/"):
+            dir = dir[:-1]
+        if dir.startswith("/"):
+            dir = dir[1:]
         if shlibs_search_dirs_re:
-            shlibs_search_dirs_re += "\|"
-        shlibs_search_dirs_re += "\(^.*\/%s\/.*$\)" % dir
-    bb.debug(2, "will use following RE to search for provides sonames %s" % shlibs_search_dirs)
+            shlibs_search_dirs_re_txt += "\|"
+        shlibs_search_dirs_re_txt += "\(^.*/%s/.*$\)" % dir
+    shlibs_search_dirs_re = re.compile(shlibs_search_dirs_re_txt)
+    bb.debug(2, "will use following RE to search for provides sonames %s" % shlibs_search_dirs_re_txt)
 
     packages = d.getVar('PACKAGES', True)
     targetos = d.getVar('TARGET_OS', True)
@@ -1389,7 +1396,7 @@  python package_do_shlibs() {
                         if not private_libs or -1 == private_libs.find(this_soname):
                             sonames.append(this_soname)
                     else:
-                        bb.debug(2, "ignoring soname %s from %s, because path doesn't match %s" % (this_soname, file, shlibs_search_dirs))
+                        bb.debug(2, "ignoring soname %s from %s, because path doesn't match %s" % (this_soname, file, shlibs_search_dirs_re_txt))
                 if libdir_re.match(os.path.dirname(file)):
                     needs_ldconfig = True
                 if snap_symlinks and (os.path.basename(file) != this_soname):