Bug 462127 - Cannot locate locale-gen
Summary: Cannot locate locale-gen
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (other bugs)
Version First Reported In: 5.26.3
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 463882 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-11-22 13:55 UTC by Zim
Modified: 2023-01-05 15:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.26.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zim 2022-11-22 13:55:11 UTC
SUMMARY

When setting the plasma language to a locale which has not been generated, it throws an error saying it cannot locate the locale-gen executable.

The `/etc/locale.gen` has been modified by the KCM.

But you have to manually run locale-gen.

An inferred cause is that "/usr/sbin/locale-gen" is not in PATH.

In the source: https://invent.kde.org/plasma/plasma-workspace/-/blob/v5.26.3/kcms/region_language/localegenhelper/localegenhelper.cpp#L131

It doesn't specify the PATH and QT will use the default. See https://doc.qt.io/qt-6/qstandardpaths.html#findExecutable

STEPS TO REPRODUCE
1. Make sure locale-gen is not in your PATH as a regular user.
2. Run "locale -a" to check what locales have already been generated.
3. Pick up any locale which is NOT listed in the result of Step 2.
4. Set the language to the locale picked in Step 3.
5. Apply.

OBSERVED RESULT

Cannot locate locale-gen.

EXPECTED RESULT

Success

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian Testing
(available in About System)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.98.0
Comment 1 Bug Janitor Service 2022-12-01 14:27:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2387
Comment 2 Nate Graham 2022-12-01 18:56:13 UTC
Git commit 9ea0745be2ee95ec25a004e911a03c55fb2f4d83 by Nate Graham, on behalf of Han Young.
Committed on 01/12/2022 at 18:56.
Pushed by ngraham into branch 'master'.

kcms/region_language: find locale-gen in system's path and sudo's path
FIXED-IN: 5.26.5

M  +11   -3    kcms/region_language/localegenhelper/localegenhelper.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/9ea0745be2ee95ec25a004e911a03c55fb2f4d83
Comment 3 Nate Graham 2022-12-01 18:57:21 UTC
Git commit a9d92efac4ee9061c0b040471ddfbd08640e7c1e by Nate Graham, on behalf of Han Young.
Committed on 01/12/2022 at 18:57.
Pushed by ngraham into branch 'cherry-pick-50eee7e0'.

find in system's path and sudo's path


(cherry picked from commit 50eee7e0f1089b72606afd4400e91ab963a8b7e0)

M  +11   -3    kcms/region_language/localegenhelper/localegenhelper.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/a9d92efac4ee9061c0b040471ddfbd08640e7c1e
Comment 4 hanyoung 2023-01-05 15:33:58 UTC
*** Bug 463882 has been marked as a duplicate of this bug. ***