[OE-core] [RFC][PATCH 6/6] local.conf.sample: make debug-tweaks depend on IMAGE_MODE
Patrick Ohly
patrick.ohly at intel.com
Tue May 16 07:12:27 UTC 2017
On Mon, 2017-05-15 at 15:27 +0200, Patrick Ohly wrote:
> Enabling "debug-tweaks" unconditionally, even if it is only in the
> local.conf.sample file, runs the risk of that getting used in
> production images.
>
> By checking the per-image IMAGE_MODE, the debug tweaks only get
> enabled for images not meant for production.
>
> Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
> ---
> meta/conf/local.conf.sample | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/meta/conf/local.conf.sample b/meta/conf/local.conf.sample
> index 85c5e21..edadbb7 100644
> --- a/meta/conf/local.conf.sample
> +++ b/meta/conf/local.conf.sample
> @@ -114,8 +114,9 @@ PACKAGE_CLASSES ?= "package_ipk"
> # e.g. ssh root access has a blank password
> # There are other application targets that can be used here too, see
> # meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
> -# We default to enabling the debugging tweaks.
> -EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
> +# We default to enabling the debugging tweaks unless an image is explicitly
> +# requested to be built for production.
Would it help to add an additional comment here, like this?
# Note that this expression gets evaluated separately for each image
# and that IMAGE_MODE can get set differently for different images,
# even in the same build.
> +EXTRA_IMAGE_FEATURES ?= "${@ '' if 'production' == d.getVar('IMAGE_MODE') else 'debug-tweaks'}"
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
More information about the Openembedded-core
mailing list