Skip to content

generate-defconfig: handle missing trailing newline - #1604

Merged
troglobit merged 1 commit into
mainfrom
gen-defconfig-handle-missing-newline
Sep 2, 2026
Merged

generate-defconfig: handle missing trailing newline#1604
troglobit merged 1 commit into
mainfrom
gen-defconfig-handle-missing-newline

Conversation

@rical

@rical rical commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Description

merge_config.sh appends each file with cat, which inserts nothing between files. A file that does not end with a newline therefore sticks its last line to the first line of the next. Like:

BR2_PACKAGE_FOO=yBR2_ROOTFS_OVERLAY="..."

Kconfig cannot parse that, so both settings are silently dropped and the generated defconfig keeps the base value instead.

This commit concatenate the fragments with awk. This terminates every line, so the result no longer depends on how the input files ends.

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

merge_config.sh appends each file with cat, which inserts nothing
between files. A file that does not end with a newline therefore
sticks its last line to the first line of the next. Like:

BR2_PACKAGE_FOO=yBR2_ROOTFS_OVERLAY="..."

Kconfig cannot parse that, so both settings are silently dropped and the
generated defconfig keeps the base value instead.

This commit concatenate the fragments with awk. This terminates every line,
so the result no longer depends on how the input files ends.

Signed-off-by: Richard Alpe <richard@bit42.se>
@troglobit
troglobit merged commit 0f0285e into main Sep 2, 2026
9 checks passed
@troglobit
troglobit deleted the gen-defconfig-handle-missing-newline branch September 2, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants