From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Kconfig: "selects" vs. "depends on"
Date: Sun, 4 Mar 2012 11:53:39 +0100 [thread overview]
Message-ID: <201203041153.40167.arnout@mind.be> (raw)
In-Reply-To: <20120304071855.3e6c03b5@gmail.com>
On Sunday 04 March 2012 10:18:55 Ismael Luceno wrote:
> Which should I use?
>
> Perhaps "selects" for for simple (i.e. non-configurable) dependencies,
> and "depends on" otherwise...?
Actually you have three choices here: "select", "depends on", and "if"
(which is functionally equivalent to "depends on").
I have an opinion on this, but I'm not sure if the others agree (esp.
ThomasDS :-).
- "select" should always be used, except in the cases below.
- "depends on" should be used in the BR2_PACKAGE_<pkgname> config when
* the package requires a certain toolchain config (e.g. WCHAR, CXX)
(in this case there should also be a comment that explains why the
package is not available);
* the package only exists for certain architectures (e.g. for boot
loaders);
* the package is a part of some superpackage (e.g. X11, python)
(it's a bit of a judgement call what can be considered a
superpackage);
* it is deprecated.
- "depends on" should be used in a package's additional config options
when:
* any of the above apply to the additional option;
* to enable an extra sub-sub-config option (cfr. PHP -> PHP_EXT_SQLITE
-> PHP_EXT_SQLITE_UTF8)
* when the suboption requires certain configs of another package and
'select' can't be used reliably (in this case there should also
be a comment);
* in rare cases, when the suboption requires certain configs of the
same package and it would become too complex to resolve all the
dependencies (in this case there should also be a comment)
- "if" should be used:
* to enable a package's additional config options only when the package
is selected;
* around 'source' statements (cfr. x11r7)
Note that the current packages sometimes don't follow these rules.
[Hey, maybe we should add this set of guidelines to the documentation!]
Now, you're probably asking this for the Qt tools for which you just
posted a patch, and I guess those guidelines don't help you much with
that... I would say the dependency of qmlviewer on QtDeclarative falls
under the superpackage category. However, the dependency of qmlviewer
on the SQL module is certainly not a superpackage-type, so it should
preferrably be a select, or a depends on with a comment if the select
is too difficult to get right. So the way you did it is perfect :-)
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
prev parent reply other threads:[~2012-03-04 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-04 9:18 [Buildroot] Kconfig: "selects" vs. "depends on" Ismael Luceno
2012-03-04 10:11 ` Samuel Martin
2012-03-04 10:57 ` Arnout Vandecappelle
2012-03-06 22:03 ` Peter Korsgaard
2012-03-04 10:53 ` Arnout Vandecappelle [this message]
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=201203041153.40167.arnout@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.