From: Rouven Czerwinski Date: Wed, 4 May 2022 15:47:55 +0000 (+0200) Subject: kbd: fix pam DISTRO_FEATURES check X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~4240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=366c657c688270d68b1c688a2446389c8934cd58;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git kbd: fix pam DISTRO_FEATURES check The DISTRO_FEATURES check for pam does not have a variable for no set and has no qouting for strings, in case pam is not contained within DISTRO_FEATURES, the resulting test in the install routine will not check against anything and fail with a syntax error: […]/build/tmp/work/cortexa9hf-neon-apa-linux-gnueabi/kbd/2.4.0-r0/temp/run.do_install.1052292: 158: [: =: unexpected operator check within the do_install script: if [ = yes ] Provide the quoting and a proper no value in case the pam distro feature ist not set. Signed-off-by: Rouven Czerwinski Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-core/kbd/kbd_2.4.0.bb b/meta/recipes-core/kbd/kbd_2.4.0.bb index 8a68d647e2e..4b23f1a89dc 100644 --- a/meta/recipes-core/kbd/kbd_2.4.0.bb +++ b/meta/recipes-core/kbd/kbd_2.4.0.bb @@ -31,7 +31,7 @@ FILES:${PN}-keymaps = "${datadir}/keymaps" FILES:${PN}-unimaps = "${datadir}/unimaps" do_install:append () { - if [ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', '', d)} = yes ] \ + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)}" = "yes" ] \ && [ -f ${D}${sysconfdir}/pam.d/vlock ]; then mv -f ${D}${sysconfdir}/pam.d/vlock ${D}${sysconfdir}/pam.d/vlock.kbd fi