fix(chroot): add Dpkg conffile options to prevent interactive prompts#10134
Merged
Conversation
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.
Contributor
📝 WalkthroughWalkthroughThe ChangesDpkg Conffile Handling
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
igorpecovnik
approved these changes
Jul 7, 2026
Contributor
|
✅ This PR has been reviewed and approved — all set for merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Checklist:
Summary by CodeRabbit