[oe-commits] [openembedded-core] 17/28: base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS

git at git.openembedded.org git at git.openembedded.org
Wed Jun 28 19:56:21 UTC 2017


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

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

commit ec96c985ce1c888c3ce3c4d964d7a106c3c88a5c
Author: André Draszik <adraszik at tycoint.com>
AuthorDate: Mon Jun 26 11:08:45 2017 +0100

    base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS
    
    It can be useful to add RRECOMMENDS to packages created, based
    on certain PACKAGECONFIGs.
    
    In particular where a package depends on certain linux kernel
    infrastructure (kernel modules) which might or might not be
    built as a module, being able to RRECOMMENDS instead of
    RDEPENDS on the relevant packages avoids build failures in
    case those modules are built statically into the kernel, i.e.
    in case no package is being created for them.
    
    Add another field to the PACKAGECONFIG syntax to achieve just
    that.
    
    Signed-off-by: André Draszik <adraszik at tycoint.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/base.bbclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 7892665..3762c8a 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -384,7 +384,7 @@ python () {
     # These take the form:
     #
     # PACKAGECONFIG ??= "<default options>"
-    # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"
+    # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends"
     pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
     if pkgconfigflags:
         pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
@@ -426,12 +426,13 @@ python () {
 
         extradeps = []
         extrardeps = []
+        extrarrecs = []
         extraconf = []
         for flag, flagval in sorted(pkgconfigflags.items()):
             items = flagval.split(",")
             num = len(items)
-            if num > 4:
-                bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend can be specified!"
+            if num > 5:
+                bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend,rrecommend can be specified!"
                     % (d.getVar('PN'), flag))
 
             if flag in pkgconfig:
@@ -439,12 +440,15 @@ python () {
                     extradeps.append(items[2])
                 if num >= 4 and items[3]:
                     extrardeps.append(items[3])
+                if num >= 5 and items[4]:
+                    extrarrecs.append(items[4])
                 if num >= 1 and items[0]:
                     extraconf.append(items[0])
             elif num >= 2 and items[1]:
                     extraconf.append(items[1])
         appendVar('DEPENDS', extradeps)
         appendVar('RDEPENDS_${PN}', extrardeps)
+        appendVar('RRECOMMENDS_${PN}', extrarrecs)
         appendVar('PACKAGECONFIG_CONFARGS', extraconf)
 
     pn = d.getVar('PN')

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


More information about the Openembedded-commits mailing list