Skip to content

fix(chroot): add Dpkg conffile options to prevent interactive prompts#10134

Merged
igorpecovnik merged 1 commit into
armbian:mainfrom
Grippy98:conffile-fix
Jul 7, 2026
Merged

fix(chroot): add Dpkg conffile options to prevent interactive prompts#10134
igorpecovnik merged 1 commit into
armbian:mainfrom
Grippy98:conffile-fix

Conversation

@Grippy98

@Grippy98 Grippy98 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description

When a cached rootfs contains a modified conffile (e.g. ubuntu-pro-client's /etc/apt/apt.conf.d/20apt-esm-hook.conf), dpkg prompts during apt-get install. In a non-interactive chroot stdin is closed, so dpkg reads EOF and exits with error 1 -- causing the build to fail after 3 retries.

DEBIAN_FRONTEND=noninteractive alone is insufficient: the conffile prompt is driven by dpkg's own logic and is not suppressed by the frontend var when stdin is a closed pipe rather than a terminal.

Fix: pass --force-confdef and --force-confold as Dpkg options in the central chroot_sdcard_apt_get function so all apt-get invocations in chroot builds resolve conffile conflicts without prompting.

This resolves the Beaglebadge_resolute_vendor_6.18.y_gnome_desktop failure where ubuntu-pro-client and its 9 dependent packages all failed to configure because of this conffile prompt.

Assisted by Claude Sonnet 4.6

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • Built Beaglebadge Resolute vendor Image w/Gnome Desktop and verified conffile prompt failure is resolved.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Bug Fixes
    • Improved chroot package installation reliability by preventing interactive prompts during package upgrades.
    • Reduced build failures caused by modified configuration files requiring manual input.

When a cached rootfs contains a modified conffile (e.g. ubuntu-pro-client's
/etc/apt/apt.conf.d/20apt-esm-hook.conf), dpkg prompts during apt-get
install. In a non-interactive chroot stdin is closed, so dpkg reads EOF
and exits with error 1 -- causing the build to fail after 3 retries.

DEBIAN_FRONTEND=noninteractive alone is insufficient: the conffile prompt
is driven by dpkg's own logic and is not suppressed by the frontend var
when stdin is a closed pipe rather than a terminal.

Fix: pass --force-confdef and --force-confold as Dpkg options in the
central chroot_sdcard_apt_get function so all apt-get invocations in
chroot builds resolve conffile conflicts without prompting.

This resolves the Beaglebadge_resolute_vendor_6.18.y_gnome_desktop failure
where ubuntu-pro-client and its 9 dependent packages all failed to
configure because of this conffile prompt.
@Grippy98 Grippy98 requested a review from igorpecovnik July 6, 2026 19:35
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The chroot_sdcard_apt_get function in lib/functions/logging/runners.sh is updated to include two additional apt_params entries specifying Dpkg::Options::=--force-confdef and Dpkg::Options::=--force-confold, preventing dpkg from prompting about modified conffiles during non-interactive chroot builds.

Changes

Dpkg Conffile Handling

Layer / File(s) Summary
Add force-conf dpkg options to chroot apt-get
lib/functions/logging/runners.sh
Two Dpkg::Options::= entries (--force-confdef, --force-confold) are appended to apt_params in chroot_sdcard_apt_get to avoid interactive conffile prompts.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding Dpkg conffile options to avoid interactive prompts in chroot builds.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release Needs review Seeking for review Framework Framework components labels Jul 6, 2026
@github-actions github-actions Bot added the Ready to merge Reviewed, tested and ready for merge label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot removed the Needs review Seeking for review label Jul 7, 2026
@igorpecovnik igorpecovnik merged commit 37032d1 into armbian:main Jul 7, 2026
13 checks passed
@Grippy98 Grippy98 deleted the conffile-fix branch July 7, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release Framework Framework components Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

2 participants