From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 1/2] [RFC] base.bbclass: extend PACKAGECONFIG to also allow RRECOMMENDS
Date: Mon, 26 Jun 2017 11:08:45 +0100 [thread overview]
Message-ID: <20170626100846.3950-1-git@andred.net> (raw)
In-Reply-To: <20170619103238.2626-1-git@andred.net>
From: André Draszik <adraszik@tycoint.com>
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@tycoint.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 78926656d7..3762c8addc 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')
--
2.11.0
next prev parent reply other threads:[~2017-06-26 10:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 10:32 [PATCH] connman: fix nftables dependency André Draszik
2017-06-19 12:02 ` Andreas Oberritter
2017-06-19 12:06 ` André Draszik
2017-06-19 12:30 ` Andreas Oberritter
2017-06-19 12:40 ` Maxin B. John
2017-06-26 10:08 ` André Draszik [this message]
2017-06-26 10:08 ` [PATCH v2 2/2] " André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170626100846.3950-1-git@andred.net \
--to=git@andred.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox