From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patrick Ohly <patrick.ohly@intel.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [RFC][PATCH 0/6] development vs. production builds
Date: Tue, 16 May 2017 08:29:24 +0100 [thread overview]
Message-ID: <1494919764.27342.27.camel@linuxfoundation.org> (raw)
In-Reply-To: <cover.da0bfaf0b62cb1033573711fd83cf5251f8827f3.1494854721.git-series.patrick.ohly@intel.com>
On Mon, 2017-05-15 at 15:26 +0200, Patrick Ohly wrote:
> At OEDAM [1] I took the AR to flesh out some of my ideas for
> introducing global and per-image settings for switching between
> development and production builds. The goal is partly to establish
> common configure options that then can be used by different layers,
> partly to have some actual useful functionality attached to them
> already in OE-core.
>
> "development" builds are what a developer does when trying out a
> distro or working on his own personal device. "production" is what
> device manufacturer put onto the actual end-user hardware.
>
> At OEDAM we already concluded that per-image settings are more
> useful. However, sometimes a component also has compile-time choices
> that cannot be changed later on in an image, and indeed I found one
> example for that (kmod) in OE-core.
>
> Therefore I have included "debug-build" DISTRO_FEATURES support. It's
> a
> bit similar to manpages.bbclass, but in contrast to that (currently)
> is meant to be inherited globally - that's partly due to
> misunderstanding how manpages.bbclass was meant to be used. This can
> be changed, for now I just want to demonstrate that such a distro
> feature is not entirely useless, and what effect it could have
> already
> in OE-core.
>
> In refkit, we also switch globally between development and production
> builds via .inc files. However, I am in the process of replacing that
> with the more flexible per-image IMAGE_MODE check. So from my
> perspective, the IMAGE_MODE is more important and useful than the
> "debug-build" DISTRO_FEATURE.
>
> From a design perspective, the approach taken here is to let a
> developer or image define what mode it wants, and default features
> can
> be configured accordingly. That alternative would be to continue
> defining
> features as before and use the mode to configure QA warnings or
> errors.
>
> But I find that less flexible, and I suspect it would be harder to
> keep track of what is meant to be usable in which mode. Developers
> also would have a harder time overriding the defaults.
>
> [1] https://www.openembedded.org/wiki/OEDAM_2017
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.
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 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?
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.
Also, have you seen bb.utils.filter()? It might be useful instead of
some of your .intersection() code?
I do think you're right that we need to make some changes in this area
but overall this patchset seems too complex to me somehow and I think
we probably can achieve something similar in a simpler way...
Cheers,
Richard
next prev parent reply other threads:[~2017-05-16 7:29 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 ` Richard Purdie [this message]
2017-05-16 8:17 ` [RFC][PATCH 0/6] development vs. production builds Patrick Ohly
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=1494919764.27342.27.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=patrick.ohly@intel.com \
/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