Skip to content

desktops: suppress dpkg conffile prompt on install (non-interactive)#856

Merged
igorpecovnik merged 1 commit intomainfrom
install-suppress-conffile-prompt
Apr 14, 2026
Merged

desktops: suppress dpkg conffile prompt on install (non-interactive)#856
igorpecovnik merged 1 commit intomainfrom
install-suppress-conffile-prompt

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

Summary

On a system that previously imported a chromium conffile (e.g. `/etc/chromium/master_preferences`) from the package, `module_desktops install` blocks at:

```
Configuration file '/etc/chromium/master_preferences'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it? ...
```

The install path was already passing `--force-confold`, but that alone doesn't suppress the prompt when both the user's file and the package's new version differ from the original — exactly our case with the browser-branding overlay in #854 (overlay writes `master_preferences`, chromium .deb also ships an updated version).

Fix

  • Add `--force-confdef` alongside `--force-confold` on every `pkg_install` call. Combined semantic: "always take the default action (= keep local) on any conffile dpkg can't auto-merge, silently".
  • Export `DEBIAN_FRONTEND=noninteractive` at the top of the install branch so apt itself doesn't open a TUI for debconf questions either.

6 `pkg_install` call sites updated — desktop packages, display manager, `armbian-plymouth-theme`, and the upgrade-tier path (`_module_desktops_change_tier`).

Test plan

  • On a system where chromium was previously installed and `master_preferences` was imported from the package: re-run `armbian-config --api module_desktops install de=xfce tier=full` and confirm it runs to completion without a conffile prompt
  • `/etc/chromium/master_preferences` remains the local version (whatever was on disk) after install
  • Regression check: on a pristine system, fresh desktop install still works (conffile flags are no-op when there's nothing local to keep)

Symptom: during `module_desktops install` on a system that had
previously imported a chromium conffile from the package (e.g.
/etc/chromium/master_preferences), the install stops with:

  Configuration file '/etc/chromium/master_preferences'
   ==> File on system created by you or by a script.
   ==> File also in package provided by package maintainer.
    What would you like to do about it? ...

The install path was already passing --force-confold, but dpkg
still prompts when BOTH the user's file and the package's new
version differ from the original (exactly our case with the
browser-branding overlay in #854: we ship a
master_preferences via overlay and the chromium .deb ships its
own updated one).

Fix: add --force-confdef alongside --force-confold on every
pkg_install call, and set DEBIAN_FRONTEND=noninteractive for the
install branch so apt itself doesn't open a TUI. With both flags,
dpkg silently takes the default action (= keep local) on every
conffile it can't auto-merge.

Six pkg_install calls updated — desktop packages, display manager,
armbian-plymouth-theme, and the upgrade-tier path.

End-user effect: `armbian-config --api module_desktops install
de=... tier=...` now runs to completion without blocking on
conffile prompts, regardless of what's already on the system.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Warning

Rate limit exceeded

@igorpecovnik has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 23 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 40 minutes and 23 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 53eb3423-1211-4a29-86d1-eb21c72ee201

📥 Commits

Reviewing files that changed from the base of the PR and between a9bad9a and 7d212cf.

📒 Files selected for processing (1)
  • tools/modules/desktops/module_desktops.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch install-suppress-conffile-prompt

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 and usage tips.

@github-actions github-actions Bot added 05 Milestone: Second quarter release size/small PR with less then 50 lines labels Apr 14, 2026
@igorpecovnik igorpecovnik merged commit b881b17 into main Apr 14, 2026
98 of 106 checks passed
@igorpecovnik igorpecovnik deleted the install-suppress-conffile-prompt branch April 14, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release size/small PR with less then 50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant