From 66f22c0bd19a81ee7ccb49543f24a4f90fc012ba Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Wed, 2 Jun 2021 12:20:38 -0400 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/build.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'bitbake/lib/bb/build.py') diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index b2715fc530..6ce8f1e6d3 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py @@ -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') -- cgit v1.2.3-54-g00ecf