networkmanager: Fix many typos in DISTRO_FEATURES PACKAGECONFIG decodes
PATCH 1/1 networkmanager: Fix many typos in DISTRO_FEATURES PACKAGECONFIG decodes
fixes issues found with yocto-check-layer
File "/home/akuster/oss/maint/openembedded-core/bitbake/lib/bb/data_smart.py", line 436, in DataSmart.expand(s="nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} ", varname='PACKAGECONFIG'):
def expand(self, s, varname = None):
> return self.expandWithRefs(s, varname).value
File "/home/akuster/oss/maint/openembedded-core/bitbake/lib/bb/data_smart.py", line 426, in DataSmart.expandWithRefs(s="nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} ", varname='PACKAGECONFIG'):
except Exception as exc:
> raise ExpansionError(varname, s, exc) from exc
bb.data_smart.ExpansionError: Failure expanding variable PACKAGECONFIG, expression was nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} which triggered exception TypeError: contains() missing 1 required positional argument: 'd'
--- .../recipes-connectivity/networkmanager/networkmanager_1.10.6.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb +4 -3
@@ -59,11 +59,12 @@ do_compile_prepend() { } PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi', '', d)} \ " + PACKAGECONFIG[systemd] = " \ --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \ --without-systemdsystemunitdir, \
Signature · 1 line
2.7.4
Quoted 22 lines · Armin Kuster
fixes issues found with yocto-check-layer
File "
/home/akuster/oss/maint/openembedded-core/bitbake/lib/bb/data_smart.py", line 436, in DataSmart.expand(s="nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} ", varname='PACKAGECONFIG'):
defexpand(self, s, varname = None):
> returnself.expandWithRefs(s, varname).valueFile "
/home/akuster/oss/maint/openembedded-core/bitbake/lib/bb/data_smart.py", line 426, in DataSmart.expandWithRefs(s="nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} ", varname='PACKAGECONFIG'):
except Exception as exc:
> raiseExpansionError(varname, s, exc)from excbb.data_smart.ExpansionError: Failure expanding variable PACKAGECONFIG, expression was nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} which triggered exception TypeError:
contains()missing 1 required positional argument: 'd'Signed-off-by Armin Kuster <[email protected]>--- .../recipes-connectivity/networkmanager/networkmanager_1.10.6.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb +0
-0
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb do_compile_prepend() { · line 63
Quoted 7 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb +2
-2@@ -59,11 +59,12 @@ do_compile_prepend() { } PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} \
^ Whatever magic scripts wants to tell us: I think this was OK before.
The patch turns the logic. Intended is:
For systemd in DISTRO_FEATURES: PACKAGAGECONFIG +=systemd For systemd NOT in DISTRO_FEATURES *AND* x11 in DISTRO_FEATURES:
PACKAGAGECONFIG +=consolekit
By the way I did the similar mistake (+broke parsing really) in V1 of gobject-introspection-patch. Checking logs I found
commit b55738ef8d30d6aa92e2e644a50f4b06ec541204
Author: Jackie Huang <[email protected]> Date: Mon Nov 13 16:04:18 2017 +0800
networkmanager: add consolekit only when x11 is enabled
consolekit depends on virtual/libx11 then it requires x11 distro feature, so add consolekit option only when x11 is in DISTRO_FEATURES.
That helped me to remember what was intended.
To avoid this in the future I suggest to have systemd/consolekit in one line. That should make it more clear.
Shall I send a patch on top of master-next?
Andreas
Quoted 55 lines · Andreas Müller
Quoted 22 lines · Armin Kuster
fixes issues found with yocto-check-layer
File "
/home/akuster/oss/maint/openembedded-core/bitbake/lib/bb/data_smart.py", line 436, in DataSmart.expand(s="nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} ", varname='PACKAGECONFIG'):
defexpand(self, s, varname = None):
> returnself.expandWithRefs(s, varname).valueFile "
/home/akuster/oss/maint/openembedded-core/bitbake/lib/bb/data_smart.py", line 426, in DataSmart.expandWithRefs(s="nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} ", varname='PACKAGECONFIG'):
except Exception as exc:
> raiseExpansionError(varname, s, exc)from excbb.data_smart.ExpansionError: Failure expanding variable PACKAGECONFIG, expression was nss ifupdown netconfig dhclient dnsmasq ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', '', d)} which triggered exception TypeError:
contains()missing 1 required positional argument: 'd'Signed-off-by Armin Kuster <[email protected]>--- .../recipes-connectivity/networkmanager/networkmanager_1.10.6.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb +0
-0meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb do_compile_prepend() { · line 63
Quoted 7 lines
meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb +2
-2@@ -59,11 +59,12 @@ do_compile_prepend() { } PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)} \^ Whatever magic scripts wants to tell us: I think this was OK before.
The patch turns the logic. Intended is:
For systemd in
DISTRO_FEATURES: PACKAGAGECONFIG +=systemd For systemd NOT inDISTRO_FEATURES*AND* x11 inDISTRO_FEATURES:
PACKAGAGECONFIG +=consolekitBy the way I did the similar mistake (+broke parsing really) in V1 of gobject-introspection-patch. Checking logs I found
commit
b55738ef8d30d6aa92e2e644a50f4b06ec541204Author: Jackie Huang <[email protected]> Date: Mon Nov 13 16:04:18 2017 +0800networkmanager: add consolekit only when x11 is enabled
consolekit depends on virtual/libx11 then it requires x11 distro feature, so add consolekit option only when x11 is in
DISTRO_FEATURES.Signed-off-by Jackie Huang <[email protected]>Signed-off-by Armin Kuster <[email protected]>Signed-off-by Joe MacDonald <[email protected]>
Quoted 6 lines
That helped me to remember what was intended.
To avoid this in the future I suggest to have systemd/consolekit in one line. That should make it more clear.
Shall I send a patch on top of master-next?
yes please.
- armin
Quoted 2 lines
Andreas