Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set neutral locale (C) when running package manager or version commands #1933

Open
afbjorklund opened this issue Mar 24, 2024 · 2 comments
Open

Comments

@afbjorklund
Copy link
Contributor

afbjorklund commented Mar 24, 2024

Some of the output is locale-specific, which might affect the parsing (or scraping)

en_US

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=============================================

sv_SE

Önskat=Okänd(U)/Installera(I)/Radera(R)/Rensa(P)/Håll(H)
| Status.=Ej inst.(N)/(I)nst./Konffil.(C)/(U)ppack./Halvkonf.(F)/(H)alvinst.
| /       Vänt.utl(W)/Föresl.utl(T)
|/ Fel?Inget(=)/Ominstallera(R)/Båda(X) (Status,Fel: versaler=illa)
||/ Namn           Version      Arkitektur   Beskrivning
+++-==============-============-============-=============================================

So it should probably run the commands with LC_ALL=C in the environment


Noticed by user with Arch Linux with a german locale, in containers/podman#22148.

    package: /usr/bin/pasta ist in passt 2024_03_20.71dd405-1 enthalten
@Foxboron
Copy link
Contributor

Better to use LC_ALL=C.UTF-8 which is something that most Linux distributions should be shipping with these days.

@afbjorklund
Copy link
Contributor Author

The package names and versions are ASCII anyway, so the encoding doesn't really matter (only the language used)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants