Skip to content

fix: stop setting LC_ALL in armbian-lang.sh#10132

Merged
igorpecovnik merged 1 commit into
armbian:mainfrom
saschabuehrle:fix/issue-10131
Jul 6, 2026
Merged

fix: stop setting LC_ALL in armbian-lang.sh#10132
igorpecovnik merged 1 commit into
armbian:mainfrom
saschabuehrle:fix/issue-10131

Conversation

@saschabuehrle

@saschabuehrle saschabuehrle commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Fixes #10131

export LC_ALL=$LANG overrides every individual LC_* variable unconditionally, so any per-category locale set via update-locale (like LC_TIME=en_GB.UTF-8) gets ignored at login. The original intent was to suppress perl locale warnings on minimal images where LANG might be unset.

Replaced with a LANG fallback guard - if LANG is empty, default it to C.UTF-8. This still suppresses the perl warnings but lets update-locale work as expected.

saschabuehrle

Summary by CodeRabbit

  • Bug Fixes
    • Improved locale handling so existing language settings are no longer overridden.
    • Default language is now only applied when no LANG value is set, helping preserve custom locale configuration.
    • This change reduces unexpected behavior for tools that rely on system locale settings.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The armbian-lang.sh profile script was changed to stop exporting LC_ALL, replacing that behavior with a conditional fallback that sets LANG to C.UTF-8 only when LANG is unset, avoiding interference with update-locale.

Changes

Locale Fallback Fix

Layer / File(s) Summary
Conditional LANG fallback
packages/bsp/common/etc/profile.d/armbian-lang.sh
Removes unconditional LC_ALL export; sets LANG to C.UTF-8 only when unset, with explanatory comments.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Related issues:

  • #10131: Fixes the bug where armbian-lang.sh overrides locale settings via LC_ALL, breaking update-locale.

Suggested labels: bugfix, bsp

Suggested reviewers: igorpecovnik

🐰 A hop, a fix, a script made light,
No more LC_ALL taking flight,
Just LANG set softly, when it's bare,
update-locale now breathes fresh air.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change matches #10131 by stopping LC_ALL overrides and falling back to LANG when unset.
Out of Scope Changes check ✅ Passed The patch is narrowly scoped to the locale script and introduces no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: removing the LC_ALL override in armbian-lang.sh.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added size/small PR with less then 50 lines 08 Milestone: Third quarter release labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Hey @saschabuehrle! 👋

Thanks for submitting your first pull request to the Armbian project — we're excited to have you contributing! 🧡
Your effort doesn’t just improve Armbian — it benefits the entire community of users and developers.

If you'd like to stay informed about project updates or collaborate more closely with the team,
you can optionally share some personal contact preferences at armbian.com/update-data.
This helps us keep in touch without relying solely on GitHub notifications.

Also, don’t forget to ⭐ star the repo if you haven’t already — and welcome aboard! 🚀

@github-actions github-actions Bot added Needs review Seeking for review BSP Board Support Packages labels Jul 6, 2026
@igorpecovnik

Copy link
Copy Markdown
Member

This was one very old workaround ...

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions Bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Jul 6, 2026
@igorpecovnik igorpecovnik merged commit 9b27177 into armbian:main Jul 6, 2026
13 checks passed
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.

[Bug]: armbian-lang.sh‎ breaks update-locale

2 participants