]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
devtool: modify: Handle recipes with a menuconfig task correctly
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 15 Dec 2023 12:12:06 +0000 (13:12 +0100)
committerSteve Sakoman <steve@sakoman.com>
Tue, 23 Jan 2024 14:27:34 +0000 (04:27 -1000)
This avoids the following error when running `devtool modify` on a
recipe that has a menuconfig task, but does not have
KCONFIG_CONFIG_ENABLE_MENUCONFIG set.

  .../temp/run.do_configure.4163366: line 152:
  ${@ oe.types.boolean('${KCONFIG_CONFIG_ENABLE_MENUCONFIG}') }: bad substitution
  WARNING: .../temp/run.do_configure.4163366:152 exit 1 from
  '[ ${@ oe.types.boolean('${KCONFIG_CONFIG_ENABLE_MENUCONFIG}') } = True ]'

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e87e6fa84a0c4b5ac8e736dc62f6e08390ba2436)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
scripts/lib/devtool/standard.py

index 55fa38ccfb89c63aa1e0c536c8e46487d4a4647e..0126f75022db646faa5f69d28eff539f2238710d 100644 (file)
@@ -971,7 +971,7 @@ def modify(args, config, basepath, workspace):
                         '}\n')
             if rd.getVarFlag('do_menuconfig','task'):
                 f.write('\ndo_configure:append() {\n'
-                '    if [ ${@ oe.types.boolean(\'${KCONFIG_CONFIG_ENABLE_MENUCONFIG}\') } = True ]; then\n'
+                '    if [ ${@oe.types.boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG"))} = True ]; then\n'
                 '        cp ${KCONFIG_CONFIG_ROOTDIR}/.config ${S}/.config.baseline\n'
                 '        ln -sfT ${KCONFIG_CONFIG_ROOTDIR}/.config ${S}/.config.new\n'
                 '    fi\n'