From: Valentin Rothberg <valentinrothberg@gmail.com>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: "Luis R. Rodriguez" <mcgrof@suse.com>,
"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
mmarek@suse.com, josh@joshtriplett.org, jbottomley@odin.com,
geert@linux-m68k.org, herbert@gondor.apana.org.au, tiwai@suse.de,
corbet@lwn.net, linux-kbuild@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
roberto@dicosmo.org, zack@upsilon.cc, soos.mate@gmail.com,
skl@det.ua.pt, iouliia@det.ua.pt, Armin Biere <biere@jku.at>,
Julia Lawall <julia.lawall@lip6.fr>,
ziegler@cs.fau.de
Subject: Re: [PATCH v3] kbuild: document recursive dependency limitation / resolution
Date: Tue, 6 Oct 2015 11:22:31 +0200 [thread overview]
Message-ID: <20151006092231.GC2681@nebuchadnezzar.informatik.uni-erlangen.de> (raw)
In-Reply-To: <1444120375.2417.10.camel@tiscali.nl>
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
Hi Paul,
On Oct 06 '15 10:32, Paul Bolle wrote:
> Hi Valentin,
>
> On di, 2015-10-06 at 10:19 +0200, Valentin Rothberg wrote:
> > I think that a general remark that using selects should be discouraged
> > as, besides causing the recursive issue, selects can also break
> > dependencies.
>
> How do selects break dependencies?
Consider the following example (I also attached it as a path):
config A
bool "CONFIG A"
config B
bool "CONFIG B"
depends on !A
config C
bool "CONFIG C"
depends on A
select B
The option B and C are clearly contradicting with respect to A.
However, when A is set, C can be set as well because Kconfig does not
visit the dependencies of the select target (in this case B). And since
Kconfig does not visit the dependencies, it breaks the dependencies of B
(!A).
You can test the example after applying the patch via:
$ make KBUILD_KCONFIG=bad_selects.Kconfig menuconfig
Set A, then set C and you'll see that B is set to 'y' as well.
Kind regards,
Valentin
[-- Attachment #2: bad_selects.patch --]
[-- Type: text/x-diff, Size: 314 bytes --]
diff --git a/bad_selects.Kconfig b/bad_selects.Kconfig
new file mode 100644
index 000000000000..989fc4e1fc17
--- /dev/null
+++ b/bad_selects.Kconfig
@@ -0,0 +1,11 @@
+config A
+ bool "CONFIG A"
+
+config B
+ bool "CONFIG B"
+ depends on !A
+
+config C
+ bool "CONFIG C"
+ depends on A
+ select B
next prev parent reply other threads:[~2015-10-06 9:22 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-29 20:09 [PATCH] kbuild: document recursive dependency limitation / resolution Luis R. Rodriguez
2015-07-29 20:34 ` Randy Dunlap
2015-08-04 11:57 ` Michal Marek
2015-08-04 12:05 ` Paul Bolle
2015-09-23 15:50 ` Luis R. Rodriguez
2015-09-23 15:48 ` Luis R. Rodriguez
2015-07-29 20:54 ` josh
2015-09-23 15:46 ` Luis R. Rodriguez
2015-08-05 11:57 ` Paul Bolle
2015-08-10 18:57 ` Luis R. Rodriguez
2015-09-03 11:56 ` Paul Bolle
2015-09-08 13:12 ` Luis R. Rodriguez
2015-09-23 15:53 ` Luis R. Rodriguez
2015-09-23 16:41 ` [PATCH v3] " Luis R. Rodriguez
2015-10-04 13:42 ` Valentin Rothberg
2015-10-05 23:03 ` Luis R. Rodriguez
2015-10-06 8:19 ` Valentin Rothberg
2015-10-06 8:32 ` Paul Bolle
2015-10-06 9:22 ` Valentin Rothberg [this message]
2015-10-07 23:08 ` Luis R. Rodriguez
2015-10-06 9:16 ` Paul Bolle
2015-10-07 23:16 ` [PATCH v4] " Luis R. Rodriguez
2015-10-08 13:37 ` Michal Marek
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=20151006092231.GC2681@nebuchadnezzar.informatik.uni-erlangen.de \
--to=valentinrothberg@gmail.com \
--cc=biere@jku.at \
--cc=corbet@lwn.net \
--cc=geert@linux-m68k.org \
--cc=herbert@gondor.apana.org.au \
--cc=iouliia@det.ua.pt \
--cc=jbottomley@odin.com \
--cc=josh@joshtriplett.org \
--cc=julia.lawall@lip6.fr \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=mcgrof@suse.com \
--cc=mmarek@suse.com \
--cc=pebolle@tiscali.nl \
--cc=roberto@dicosmo.org \
--cc=skl@det.ua.pt \
--cc=soos.mate@gmail.com \
--cc=tiwai@suse.de \
--cc=zack@upsilon.cc \
--cc=ziegler@cs.fau.de \
/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;
as well as URLs for NNTP newsgroup(s).