Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [RFC][PATCH 0/6] development vs. production builds
Date: Tue, 16 May 2017 10:17:30 +0200	[thread overview]
Message-ID: <1494922650.1179.301.camel@intel.com> (raw)
In-Reply-To: <1494919764.27342.27.camel@linuxfoundation.org>

On Tue, 2017-05-16 at 08:29 +0100, Richard Purdie wrote:
> I'm not really sure I like this change, it seems fairly invasive and
> complex for gains which don't seem to add up to me.
> 
> For example after your patchset, we end up with two different places
> motd may be generated based on various flags. I think it would be
> confusing for the user to find out where a message as coming from.

Fair enough. I'm not a big fan of the "debug-build" DISTRO_FEATURES
either, and just included it as reference for what could be done at the
distro level.

What about just patch 4, the one which introduces image-mode.bbclass? Is
that of enough interest to carry it in OE-core? With or without enabling
it by default for images (patch 5)?

That classes currently defines three modes in IMAGE_MODE_VALID, but
intentionally with the weakest default possible. Distros can override
that to match their intended usage modes, or (better, now that I think
about it) we make the default empty and when users try to set IMAGE_MODE
(because they might have seen it in some other distro) they get an error
(assuming that we inherit the class in image.bbclass).

My concern with not having this class in OE-core is that each distro
will have to come up with their own way of doing something like this,
with no consistency between distros. That is going to confuse some
users. If a distro does not want this feature, they can just ignore the
class, once we make IMAGE_MODE_VALID empty by default.

> One of the reasons I have grown to hate "debug-tweaks" is that when you
> enable it, you have no idea what you're really changing as the name
> doesn't tell you what it does.

I'm fine with eliminating "debug-tweaks" entirely. In that case,
local.conf.sample should just list the individual features directly?

>  I worry "debug-build" will become the
> same problem, it doesn't do one thing well but many things badly. If it
> really just changes debug and logging PACKAGECONFIG (if present), why
> doesn't the distro just do that?

The idea was that the distro or user can set a global flag without
having to know all these details. For example, consider the case where a
user adds a custom recipe to a distro. If the distro has a
"development.inc" and "production.inc" with PACKAGECONFIGs that tune
recipes to match the intended usage, then those lists won't configure
the custom recipe. 

> I also worry about the number of classes this introduces. Whilst
> classes are cheap and easy, I have heard concerns we have too many of
> them. In this case image-mode gets hardcoded into image.bbclass.

We could merge the content of image-mode.bbclass also into
image.bbclass, if there is consensus that this code should be active by
default.

I've done it differently here because I wanted to have the ability to
use the standalone image-mode.bbclass in refkit.

-- 
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.





  reply	other threads:[~2017-05-16  8:17 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-15 13:26 [RFC][PATCH 0/6] development vs. production builds Patrick Ohly
2017-05-15 13:26 ` [RFC][PATCH 1/6] build-mode.bbclass: distro-wide debug-build mode Patrick Ohly
2017-05-15 13:26 ` [RFC][PATCH 2/6] basefiles: warn about non-production DISTRO_FEATURES in motd Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 3/6] defaultsetup.conf: enable special "debug-build" DISTRO_FEATURES support Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 4/6] image-mode.bbclass: per-image production/development/debug mode Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 5/6] image.bbclass: include IMAGE_MODE support Patrick Ohly
2017-05-15 13:27 ` [RFC][PATCH 6/6] local.conf.sample: make debug-tweaks depend on IMAGE_MODE Patrick Ohly
2017-05-15 15:50   ` Khem Raj
2017-05-15 19:18     ` Patrick Ohly
2017-05-15 19:34       ` Khem Raj
2017-05-15 19:47         ` Patrick Ohly
2017-05-15 20:25           ` Khem Raj
2017-05-16  6:26             ` Patrick Ohly
2017-05-16  7:12   ` Patrick Ohly
2017-05-16  7:29 ` [RFC][PATCH 0/6] development vs. production builds Richard Purdie
2017-05-16  8:17   ` Patrick Ohly [this message]
2017-05-17  7:58     ` [PATCH v2 0/1] " Patrick Ohly
2017-05-17  7:58       ` [PATCH v2 1/1] image-mode.bbclass: common infrastructure for choosing image defaults Patrick Ohly
2017-05-17  8:38         ` Patrick Ohly
2017-05-17  9:49         ` Alexander Kanavin
2017-05-17 10:47           ` Patrick Ohly
2017-05-17 12:56             ` Alexander Kanavin
2017-05-17 13:39               ` Patrick Ohly
2017-05-17 14:17                 ` Alexander Kanavin
2017-05-16  7:35 ` [RFC][PATCH 0/6] development vs. production builds Mike Looijmans
2017-05-16  8:21   ` Patrick Ohly
2017-05-16 11:49     ` Alexander Kanavin
2017-05-16 13:47       ` Patrick Ohly
2017-05-16 14:02         ` Alexander Kanavin
2017-05-16 14:25           ` Patrick Ohly
2017-05-16 16:27             ` Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494922650.1179.301.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox