Skip to content

[Error] HOST_LOCALE not obtained correctly when /etc/locale.conf doesn't exist #1840

@mid-kid

Description

@mid-kid

Describe the bug
Currently, when creating a distrobox on a host system where /etc/locale.conf does not exist, the container's LANG variable will be set to a locale that's not available in the container.

For example, in gentoo, the locale is set in /etc/env.d/02locale instead of /etc/locale.conf, which the distrobox-init script never reads, and instead initializes the HOST_LOCALE variable to a fallback value.

I'd suggest having distrobox pick up the LANG variable from the host environment, instead of trying to parse host system configuration. Alternatively, distrobox should provide a way to set HOST_LOCALE in the configuration, and set the container's LANG variable to the same value.

This is a follow-up of #1743

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions