Skip to contentSkip to conversation

Fixes for PACKAGECONFIG

PATCH In review Robert Yang 2 participants 8 messages Jun 11, 2015 – Jun 16, 2015

lore
Share & tools
lore
#0 lore raw

cover Fixes for PACKAGECONFIG

The following changes since commit 7f85e74d5c53b34e5f470967fdbdbd19fed1929a:

sysvinit: Only enable recipe in builds where its applicable (2015-06-10 12:03:14 +0100)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/pkgconfig
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/pkgconfig

Robert Yang (3):
base.class: warn for invalid PACKAGECONFIG
bluez5: remove alsa from PACKAGECONFIG
libpcap: fix PACKAGECONFIG

 meta/classes/base.bbclass                     |    5 +++++
 meta/recipes-connectivity/bluez5/bluez5.inc   |    2 +-
 meta/recipes-connectivity/libpcap/libpcap.inc |    2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/3 base.class: warn for invalid PACKAGECONFIG

There may be typos or out of date values in PACKAGECONFIG, check and warn them.

---
 meta/classes/base.bbclass |    5 +++++
 1 file changed, 5 insertions(+)
meta/classes/base.bbclass +5 -0
index 8637f9f..46762d9 100644
@@ -341,6 +341,11 @@ python () {
     if pkgconfigflags:
         pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
         pn = d.getVar("PN", True)
+
+        for pconfig in pkgconfig:
+            if pconfig not in pkgconfigflags:
+                bb.warn("%s: invalid PACKAGECONFIG: %s" % (pn, pconfig))
+
         mlprefix = d.getVar("MLPREFIX", True)
 
         def expandFilter(appends, extension, prefix):
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/3 bluez5: remove alsa from PACKAGECONFIG

In reply to Robert Yang

The PACKAGECONFIG[alsa] had been removed when upgraded to 5.12 since it was not supported any more.

---
 meta/recipes-connectivity/bluez5/bluez5.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/bluez5/bluez5.inc +1 -1
index 67aafbb..ae9402f 100644
@@ -12,7 +12,7 @@ RPROVIDES_${PN} += "bluez-hcidump"
 
 RCONFLICTS_${PN} = "bluez4"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} obex-profiles"
+PACKAGECONFIG ??= "obex-profiles"
 PACKAGECONFIG[obex-profiles] = "--enable-obex,--disable-obex,libical"
 PACKAGECONFIG[experimental] = "--enable-experimental,--disable-experimental,"
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 3/3 libpcap: fix PACKAGECONFIG

In reply to Robert Yang

The BLUEZ is default to bluez5, but there is only PACKAGECONFIG[bluez4], no PACKAGECONFIG[bluez5], and the current version of libpcap (or the higher version 1.7.3) only supports bluez4, we can't use ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} for PACKAGECONFIG any more since BLUEZ is default to bluez5, and not supported, and there is no bluez4 in oe-core any more, set PACKAGECONFIG to "" by default, other layers where bluez4 is available can enable it via bbappend.

---
 meta/recipes-connectivity/libpcap/libpcap.inc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/libpcap/libpcap.inc +1 -1
index 9b059d7..b7c3995 100644
@@ -20,7 +20,7 @@ inherit autotools binconfig-disabled pkgconfig bluetooth
 
 EXTRA_OECONF = "--with-pcap=linux"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
+PACKAGECONFIG ??= ""
 PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
 PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb"
 PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
Signature · 1 line
1.7.9.5
#4 lore raw

Re: [PATCH 3/3] libpcap: fix PACKAGECONFIG

Quoted 10 lines · Robert Yang

The BLUEZ is default to bluez5, but there is only PACKAGECONFIG[bluez4], no PACKAGECONFIG[bluez5], and the current version of libpcap (or the higher version 1.7.3) only supports bluez4, we can't use ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} for PACKAGECONFIG any more since BLUEZ is default to bluez5, and not supported, and there is no bluez4 in oe-core any more, set PACKAGECONFIG to ""
by default, other layers where bluez4 is available can enable it via bbappend.

So the point of this logic is that simply removing bluez5 from DISTRO_FEATURES results in bluez4 being enabled where relevant, which you're removing.

Would a better fix would be to have a dummy (empty) bluez5 stanza?

Ross

#5 lore raw

Re: [PATCH 3/3] libpcap: fix PACKAGECONFIG

Quoted 13 lines · Ross

On 11 June 2015 at 10:08, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

The BLUEZ is default to bluez5, but there is only PACKAGECONFIG[bluez4], no PACKAGECONFIG[bluez5], and the current version of libpcap (or the higher version 1.7.3) only supports bluez4, we can't use ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} for PACKAGECONFIG any more since BLUEZ is default to bluez5, and not supported, and there is no bluez4 in oe-core any more, set PACKAGECONFIG to "" by default, other layers where bluez4 is available can enable it via bbappend.

Quoted 4 lines

So the point of this logic is that simply removing bluez5 from DISTRO_FEATURES results in bluez4 being enabled where relevant, which you're removing.

Would a better fix would be to have a dummy (empty) bluez5 stanza?

Hi Ross,

The code was:
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}" PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"

BLUEZ is default to bluez5, did you mean that we add a line like:
PACKAGECONFIG[bluez5] = ",,"
or
PACKAGECONFIG[bluez5] = ",--disable-bluetooth,"

But we didn't need such a line, since when PACKAGECONFIG != bluez4, the --disable-bluetooth will be used.

Maybe we can simply drop this patch ? I made this patch to avoid confusing the user.

// Robert

Quoted 2 lines

Ross

#6 lore raw

Re: [PATCH 3/3] libpcap: fix PACKAGECONFIG

Quoted 29 lines · Robert Yang
Quoted 15 lines · Ross

On 11 June 2015 at 10:08, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

The BLUEZ is default to bluez5, but there is only PACKAGECONFIG[bluez4], no PACKAGECONFIG[bluez5], and the current version of libpcap (or the higher version 1.7.3) only supports bluez4, we can't use ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} for PACKAGECONFIG any more since BLUEZ is default to bluez5, and not supported, and there is no bluez4 in oe-core any more, set PACKAGECONFIG
to ""
by default, other layers where bluez4 is available can enable it via
bbappend.

Quoted 4 lines

So the point of this logic is that simply removing bluez5 from DISTRO_FEATURES results in bluez4 being enabled where relevant, which you're removing.

Would a better fix would be to have a dummy (empty) bluez5 stanza?

Hi Ross,

The code was:
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)}"
PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"

Quoted 4 lines

BLUEZ is default to bluez5, did you mean that we add a line like:
PACKAGECONFIG[bluez5] = ",,"
or
PACKAGECONFIG[bluez5] = ",--disable-bluetooth,"

Hi Ross,

After more thoughts, add a dummy PACKAGECONFIG can avoid confusing the user, and avoid the warning, so I updated in the repo:

git://git.openembedded.org/openembedded-core-contrib rbt/pkgconfig

The BLUEZ is default to bluez5, but there is only PACKAGECONFIG[bluez4], no PACKAGECONFIG[bluez5], add a dummy PACKAGECONFIG for bluez5 to avoid confusing the user, and avoid the warning.

---
 meta/recipes-connectivity/libpcap/libpcap.inc |    2 ++
 1 file changed, 2 insertions(+)
meta/recipes-connectivity/libpcap/libpcap.inc +0 -0
index 9b059d7..0873c24 100644
@@ -22,6 +22,8 @@ EXTRA_OECONF = "--with-pcap=linux"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 

'${BLUEZ}', '', d)}"
PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4"
+# Add a dummy PACKAGECONFIG for bluez5 since it is not supported by libpcap. +PACKAGECONFIG[bluez5] = ",,"
PACKAGECONFIG[canusb] = "--enable-canusb,--enable-canusb=no,libusb" PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" PACKAGECONFIG[libnl] = "--with-libnl,--without-libnl,libnl"

// Robert

Quoted 11 lines

But we didn't need such a line, since when PACKAGECONFIG != bluez4, the --disable-bluetooth will be used.

Maybe we can simply drop this patch ? I made this patch to avoid confusing the user.

// Robert

Quoted 2 lines

Ross

#7 lore raw

Re: [PATCH 3/3] libpcap: fix PACKAGECONFIG

Quoted 3 lines · Robert Yang

After more thoughts, add a dummy PACKAGECONFIG can avoid confusing the user, and avoid the warning, so I updated in the repo:

Yes, that's what I meant - thanks.

Ross