bitbake: build: warn on setting noexec/nostamp/fakeroot flag to any value besides '1'

Currently setting those flags to even the empty string "" causes it to be set,
which is contrary to the documentation. In a future version of BitBake, we'd
like to change the behavior so that setting the flag to "" does not set it.
This will allow conditionally setting noexec, using variable expansion or
inline Python.

I found no places in poky or meta-openembedded where this warning would trigger.

[YOCTO #13808]

(Bitbake rev: 1e7655c4f765ba7b4791c4cca048a69bf8d9c93d)

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Chris Laplante 2021-06-02 12:20:38 -04:00 committed by Richard Purdie
parent c9ef89b3b9
commit 66f22c0bd1

View File

@ -927,6 +927,11 @@ def add_tasks(tasklist, d):
task_deps[name] = {}
if name in flags:
deptask = d.expand(flags[name])
if name in ['noexec', 'fakeroot', 'nostamp']:
if deptask != '1':
bb.warn("In a future version of BitBake, setting the '{}' flag to something other than '1' "
"will result in the flag not being set. See YP bug #13808.".format(name))
task_deps[name][task] = deptask
getTask('mcdepends')
getTask('depends')