[oe-commits] [openembedded-core] 17/27: package.bbclass: allow shell-style wildcards in PRIVATE_LIBS

git at git.openembedded.org git at git.openembedded.org
Fri Sep 6 13:58:54 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 732db32714c208d8eeeb90308926dc886ef7b791
Author: Alexander Kanavin <alex.kanavin at gmail.com>
AuthorDate: Tue Sep 3 18:32:41 2019 +0200

    package.bbclass: allow shell-style wildcards in PRIVATE_LIBS
    
    PRIVATE_LIBS is used to exclude 'private' libraries from getting added to
    automatic runtime dependency resolution. This variable currently has to list
    all libraries by name, which becomes a maintenance issue if the list
    of such libraries frequently changes, or is very large.
    
    This change allows using shell-style wildcards in the variable, similar
    to how FILES lists what gets packaged.
    
    Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/package.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 114d655..aa8451f 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1646,7 +1646,8 @@ python package_do_shlibs() {
                 prov = (this_soname, ldir, pkgver)
                 if not prov in sonames:
                     # if library is private (only used by package) then do not build shlib for it
-                    if not private_libs or this_soname not in private_libs:
+                    import fnmatch
+                    if not private_libs or len([i for i in private_libs if fnmatch.fnmatch(this_soname, i)]) == 0:
                         sonames.add(prov)
                 if libdir_re.match(os.path.dirname(file)):
                     needs_ldconfig = True
@@ -1829,7 +1830,8 @@ python package_do_shlibs() {
             # /opt/abc/lib/libfoo.so.1 and contains /usr/bin/abc depending on system library libfoo.so.1
             # but skipping it is still better alternative than providing own
             # version and then adding runtime dependency for the same system library
-            if private_libs and n[0] in private_libs:
+            import fnmatch
+            if private_libs and len([i for i in private_libs if fnmatch.fnmatch(n[0], i)]) > 0:
                 bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0]))
                 continue
             if n[0] in shlib_provider.keys():

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list