Skip to content

Prevent silent hang when dpkg prompts during upgrades#18

Merged
yorch merged 2 commits intomainfrom
fix-interactive
Feb 1, 2026
Merged

Prevent silent hang when dpkg prompts during upgrades#18
yorch merged 2 commits intomainfrom
fix-interactive

Conversation

@yorch
Copy link
Copy Markdown
Owner

@yorch yorch commented Feb 1, 2026

Summary

  • Set DEBIAN_FRONTEND=noninteractive to suppress dpkg interactive dialogs
  • Add --force-confdef and --force-confold dpkg options to auto-resolve config file conflicts

Problem

When apt-get upgrade triggers a dpkg configuration prompt (e.g. "keep or replace this config file?"), the script hangs silently. Since runCmdAndLog redirects all output to the log file, the user never sees the prompt and has no way to know what caused the stall.

Test plan

  • Run bash run-tests.sh ubuntu:24.04 to verify the full bootstrap completes without hanging
  • Verify existing config files are preserved during package upgrades

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Enhanced automated package installation process for more reliable non-interactive deployments.
    • Improved handling of package configuration conflicts during installation procedures.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings February 1, 2026 19:46
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 1, 2026

Warning

Rate limit exceeded

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

⌛ 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.

📝 Walkthrough

Walkthrough

The bootstrap script now enables noninteractive mode for APT operations by exporting DEBIAN_FRONTEND=noninteractive and extends the APT_CMD variable with dpkg options to force configuration handling during non-interactive package installation.

Changes

Cohort / File(s) Summary
Bootstrap Configuration
bootstrap.sh
Added DEBIAN_FRONTEND=noninteractive export and extended APT_CMD with dpkg flags (--force-defdef and --force-confold) to enable non-interactive package installation with automatic configuration retention.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A script that whispers, "stay quiet, please,"
With APT commands that work with such ease,
Configuration held fast, no questions asked,
The bootstrap now hops through each install task! 📦✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: preventing dpkg prompts during package upgrades by making operations non-interactive.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-interactive

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.

@yorch yorch changed the title Refine APT_CMD to include Dpkg options for better package management Prevent silent hang when dpkg prompts during upgrades Feb 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines the APT command configuration in the bootstrap script to enable fully non-interactive package management. The changes add the DEBIAN_FRONTEND=noninteractive environment variable and configure dpkg to automatically handle configuration file conflicts during package upgrades.

Changes:

  • Added DEBIAN_FRONTEND=noninteractive export to prevent interactive prompts
  • Updated APT_CMD to include Dpkg options (--force-confdef and --force-confold) for automatic configuration file handling
  • Removed outdated comment about the -qq option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yorch yorch merged commit 7ba7b60 into main Feb 1, 2026
5 checks passed
@yorch yorch deleted the fix-interactive branch February 1, 2026 19:52
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