[PATCH] kconfig: keep builtin precedence with duplicate fragment entries

From: omer zalman

Date: Mon Sep 28 2026 - 19:45:44 EST


The -y option is meant to preserve a builtin value when a fragment
requests a module. With duplicate CONFIG_FOO=m lines, only the last
fragment line is skipped; an earlier one remains after CONFIG_FOO=y.
Kconfig reads the later assignment and can demote the symbol. Track
the symbol instead of one line, and skip all of its assignments
when builtin precedence applies.

Signed-off-by: Omer Zalman <omerzalman42@xxxxxxxxx>

The exact git-format-patch file is attached because Gmail's web
composer removes tabs from inline diffs.

Attachment: 03-kconfig-duplicate-fragments.patch
Description: Binary data