summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorAndré Draszik <adraszik@tycoint.com>2017-06-26 11:08:45 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-28 20:55:08 +0100
commitaec7969f491b79f02c7c318830ddcf79ecb9ea1b (patch)
treedeb9d8d44834180608fcc4447ba4bac03d3c9315 /meta/classes
parent627503c7b98840aedc798d34c4cd0d0a2504638f (diff)
downloadpoky-aec7969f491b79f02c7c318830ddcf79ecb9ea1b.tar.gz
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. (From OE-Core rev: ec96c985ce1c888c3ce3c4d964d7a106c3c88a5c) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 78926656d7..3762c8addc 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -384,7 +384,7 @@ python () {
384 # These take the form: 384 # These take the form:
385 # 385 #
386 # PACKAGECONFIG ??= "<default options>" 386 # PACKAGECONFIG ??= "<default options>"
387 # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends" 387 # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends"
388 pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} 388 pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
389 if pkgconfigflags: 389 if pkgconfigflags:
390 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() 390 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
@@ -426,12 +426,13 @@ python () {
426 426
427 extradeps = [] 427 extradeps = []
428 extrardeps = [] 428 extrardeps = []
429 extrarrecs = []
429 extraconf = [] 430 extraconf = []
430 for flag, flagval in sorted(pkgconfigflags.items()): 431 for flag, flagval in sorted(pkgconfigflags.items()):
431 items = flagval.split(",") 432 items = flagval.split(",")
432 num = len(items) 433 num = len(items)
433 if num > 4: 434 if num > 5:
434 bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend can be specified!" 435 bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend,rrecommend can be specified!"
435 % (d.getVar('PN'), flag)) 436 % (d.getVar('PN'), flag))
436 437
437 if flag in pkgconfig: 438 if flag in pkgconfig:
@@ -439,12 +440,15 @@ python () {
439 extradeps.append(items[2]) 440 extradeps.append(items[2])
440 if num >= 4 and items[3]: 441 if num >= 4 and items[3]:
441 extrardeps.append(items[3]) 442 extrardeps.append(items[3])
443 if num >= 5 and items[4]:
444 extrarrecs.append(items[4])
442 if num >= 1 and items[0]: 445 if num >= 1 and items[0]:
443 extraconf.append(items[0]) 446 extraconf.append(items[0])
444 elif num >= 2 and items[1]: 447 elif num >= 2 and items[1]:
445 extraconf.append(items[1]) 448 extraconf.append(items[1])
446 appendVar('DEPENDS', extradeps) 449 appendVar('DEPENDS', extradeps)
447 appendVar('RDEPENDS_${PN}', extrardeps) 450 appendVar('RDEPENDS_${PN}', extrardeps)
451 appendVar('RRECOMMENDS_${PN}', extrarrecs)
448 appendVar('PACKAGECONFIG_CONFARGS', extraconf) 452 appendVar('PACKAGECONFIG_CONFARGS', extraconf)
449 453
450 pn = d.getVar('PN') 454 pn = d.getVar('PN')