Skip to content

bsp: drop /etc/apt/preferences.d/armbian — desktop pin moves to armbian-config#9664

Open
igorpecovnik wants to merge 1 commit intomainfrom
drop-bsp-desktop-apt-pin
Open

bsp: drop /etc/apt/preferences.d/armbian — desktop pin moves to armbian-config#9664
igorpecovnik wants to merge 1 commit intomainfrom
drop-bsp-desktop-apt-pin

Conversation

@igorpecovnik
Copy link
Copy Markdown
Member

@igorpecovnik igorpecovnik commented Apr 13, 2026

Summary

The pin block in packages/bsp/common/etc/apt/preferences.d/armbian (firefox / firefox-esr / thunderbird at o=Armbian priority 1001, o=Ubuntu priority 50) is moving to armbian-config, where it will be written to /etc/apt/preferences.d/armbian-desktops on every module_desktops install — see armbian/configng#850.

Why move it

The BSP file is a dpkg conffile. From May 2023 → Feb 2026 it shipped fully commented-out (commit bc5329e"It should not be needed anymore since we re-pack those packages"). When commit f169f2c2 re-enabled it in Feb 2026, dpkg's conffile preservation rule meant existing systems kept the commented version — the new active pin only landed on freshly-installed systems. We just hit this on a real test box where thunderbird installed as snap because the local pin was inert.

By moving ownership to armbian-config and writing to a distinct path (armbian-desktops instead of armbian), dpkg conffile preservation becomes moot. The runtime helper rewrites the file on every desktop install, so the pin is always current.

Why this is safe to delete from BSP now

  • The build framework installs desktops via module_desktops install going forward, so the pin lands at image build time too — no gap.
  • Existing systems that already have /etc/apt/preferences.d/armbian keep it as an orphan conffile. Its priorities match what armbian-config now writes to armbian-desktops, so they compose harmoniously — no conflict, no double-pinning.
  • The legacy file can be cleaned up later by a BSP postrm if desired, but doesn't need active removal — it does no harm.

Stack

This PR's effect is fully realized only after armbian/configng#850 lands. If the build framework still does its own desktop install path on some boards, those would temporarily get no pin (snap-shim could win) until configng's runtime helper takes over.

Test plan

  • After armbian/configng#850 lands, build a fresh noble desktop image and confirm /etc/apt/preferences.d/armbian is absent and /etc/apt/preferences.d/armbian-desktops is present with the broader pin block (chromium / firefox / thunderbird / chrome / code / edge)
  • apt-cache policy thunderbird shows Armbian = 1001, Ubuntu = 50
  • No regression on existing systems that still have the legacy file (priorities match, no dpkg conflict)

Summary by CodeRabbit

  • Chores
    • Removed APT repository pinning configuration that restricted package source selection, allowing more flexible resolution of package dependencies.

…an-config

The pin block in this file (firefox / firefox-esr / thunderbird at
o=Armbian:1001, o=Ubuntu:50) is moving to armbian-config, which
will write /etc/apt/preferences.d/armbian-desktops on every
`module_desktops install` (see armbian/configng#850).

The build framework will install desktops via armbian-config going
forward, so the runtime helper covers both image-build time and
post-install upgrades. That gives the pin a single source of truth
in the configng repo (next to the YAML that lists the packages
the pin protects), and dodges the dpkg conffile preservation trap
that left this file commented-out and inert on systems built
between May 2023 and Feb 2026.

Existing systems with this file already deployed will keep it as
an orphan conffile — it does no harm because the priorities match
what armbian-config emits to the new -desktops file. The legacy
file can be cleaned up by users (or a later BSP postrm) if needed,
but does not need active removal.
@igorpecovnik igorpecovnik requested a review from a team as a code owner April 13, 2026 19:15
@igorpecovnik igorpecovnik requested review from Tearran and dimitry-ishenko and removed request for a team April 13, 2026 19:15
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

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: 5395c2f0-bc6a-4ee3-b144-63980abe78bb

📥 Commits

Reviewing files that changed from the base of the PR and between 43751f1 and 032777b.

📒 Files selected for processing (1)
  • packages/bsp/common/etc/apt/preferences.d/armbian
💤 Files with no reviewable changes (1)
  • packages/bsp/common/etc/apt/preferences.d/armbian

📝 Walkthrough

Walkthrough

A single APT pinning configuration file was deleted that previously enforced Firefox, Firefox-ESR, and Thunderbird packages to be sourced from the Armbian repository while deprioritizing Ubuntu versions, thereby removing the repository preference constraints.

Changes

Cohort / File(s) Summary
APT Preferences Configuration
packages/bsp/common/etc/apt/preferences.d/armbian
Deleted 13 lines of APT pinning rules that prioritized Armbian repository packages over Ubuntu repository packages for Firefox, Firefox-ESR, and Thunderbird.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hop, hop—a preference file goes away!
No more forcing Armbian's sway,
Firefox and friends now roam free,
To Ubuntu they flee,
Repository choice saves the day! 🎉

🚥 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: removing the APT preferences file from BSP and noting that the functionality moves to armbian-config, which aligns with the changeset removing /etc/apt/preferences.d/armbian.
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
  • Commit unit tests in branch drop-bsp-desktop-apt-pin

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 Needs review Seeking for review BSP Board Support Packages labels Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release BSP Board Support Packages Needs review Seeking for review size/small PR with less then 50 lines

Development

Successfully merging this pull request may close these issues.

1 participant