From 1e7655c4f765ba7b4791c4cca048a69bf8d9c93d Mon Sep 17 00:00:00 2001 From: Chris Laplante Date: Wed, 2 Jun 2021 12:20:38 -0400 Subject: 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] Signed-off-by: Chris Laplante Signed-off-by: Richard Purdie --- lib/bb/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/bb/build.py b/lib/bb/build.py index b2715fc53..6ce8f1e6d 100644 --- a/lib/bb/build.py +++ b/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 1.2.3-korg