linux/Documentation
Masahiro Yamada 3a9dd3ecb2 kconfig: make 'imply' obey the direct dependency
The 'imply' statement may create unmet direct dependency when the
implied symbol depends on m.

[Test Code]

  config FOO
          tristate "foo"
          imply BAZ

  config BAZ
          tristate "baz"
          depends on BAR

  config BAR
          def_tristate m

  config MODULES
          def_bool y
          option modules

If you set FOO=y, BAZ is also promoted to y, which results in the
following .config file:

  CONFIG_FOO=y
  CONFIG_BAZ=y
  CONFIG_BAR=m
  CONFIG_MODULES=y

This does not meet the dependency 'BAZ depends on BAR'.

Unlike 'select', what is worse, Kconfig never shows the
'WARNING: unmet direct dependencies detected for ...' for this case.

Because 'imply' is considered to be weaker than 'depends on', Kconfig
should take the direct dependency into account.

For clarification, describe this case in kconfig-language.rst too.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
2020-03-13 10:05:34 +09:00
..
2020-02-05 17:44:14 +00:00
2020-02-28 09:02:18 -08:00
2019-10-30 16:25:31 +01:00
2020-02-16 13:05:46 -08:00
2020-01-03 11:43:44 +10:00
2019-12-11 09:12:38 +01:00
2020-01-31 14:43:23 -08:00
2019-10-10 11:25:39 -06:00
2020-02-04 13:06:46 +00:00
2019-07-17 06:57:52 -03:00
2020-01-28 16:26:57 -08:00
2019-12-30 11:58:02 -07:00
2019-09-27 11:17:38 -07:00
2020-02-25 03:10:22 -07:00