Skip to content

armbian-upgrade: use apt-get to silence apt CLI-warning noise#9998

Merged
igorpecovnik merged 1 commit into
mainfrom
fix/armbian-upgrade-apt-warning
Jun 19, 2026
Merged

armbian-upgrade: use apt-get to silence apt CLI-warning noise#9998
igorpecovnik merged 1 commit into
mainfrom
fix/armbian-upgrade-apt-warning

Conversation

@igorpecovnik

@igorpecovnik igorpecovnik commented Jun 19, 2026

Copy link
Copy Markdown
Member

What

/usr/bin/armbian-upgrade calls plain apt, which prints

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

on every non-interactive invocation — so each upgrade run emits it twice (once for apt update, once for apt -y upgrade), cluttering build logs and user output.

Switch to apt-get, the stable scripting interface, which behaves identically for update / upgrade / clean / autoremove but prints no such warning.

Not addressed here

The separate [ ! ] repository switch returned non-zero line is emitted at runtime (armbian-config repo handling), not by this script — out of scope for this change.

Summary by CodeRabbit

  • Bug Fixes
    • Improved system upgrade process reliability and stability by enhancing the underlying upgrade mechanism.

Plain `apt` prints "WARNING: apt does not have a stable CLI interface. Use
with caution in scripts." on every non-interactive invocation, so each run of
armbian-upgrade emitted it twice. apt-get is the stable scripting interface and
behaves identically here (update/upgrade/clean/autoremove).

Signed-off-by: Igor Pecovnik <igor@armbian.com>
@igorpecovnik igorpecovnik requested a review from a team as a code owner June 19, 2026 12:23
@igorpecovnik igorpecovnik requested review from dimitry-ishenko and iav and removed request for a team June 19, 2026 12:23
@github-actions github-actions Bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release Needs review Seeking for review BSP Board Support Packages labels Jun 19, 2026
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 10e609a6-b44f-4af1-81fa-84df9eff12d6

📥 Commits

Reviewing files that changed from the base of the PR and between 2195f35 and a8c501a.

📒 Files selected for processing (1)
  • packages/bsp/common/usr/bin/armbian-upgrade

📝 Walkthrough

Walkthrough

The armbian-upgrade script replaces all apt front-end invocations with direct apt-get calls (apt-get update, apt-get -y upgrade, apt-get clean, apt-get -y autoremove) and adds inline comments explaining the choice. The surrounding script structure (root check, trap, exit) is unchanged.

Changes

apt-get migration in armbian-upgrade

Layer / File(s) Summary
Replace apt with apt-get in upgrade steps
packages/bsp/common/usr/bin/armbian-upgrade
The four upgrade operations (update, upgrade, clean, autoremove) are rewritten to call apt-get directly, with comments noting the preference for apt-get in scripts.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A hop through the script, a small swap in place,
apt steps aside, apt-get takes the race.
Update, upgrade, clean, autoremove too —
Stable scripting magic, all shiny and new.
The rabbit nods once and bounds off with glee! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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: replacing apt with apt-get to eliminate CLI warning messages from the script.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/armbian-upgrade-apt-warning

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.

@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Jun 19, 2026
@igorpecovnik igorpecovnik merged commit a80a83c into main Jun 19, 2026
14 checks passed
@igorpecovnik igorpecovnik deleted the fix/armbian-upgrade-apt-warning branch June 19, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

08 Milestone: Third quarter release BSP Board Support Packages 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.

1 participant