rpmdb/header.c (guess_category_value): Allow overriding locale using $RPM_LANGUAGE_I18NSTRING for headerFindI18NString
We want to abuse I18NSTRING for storing arbitrary data, e.g. GIT commit identifiers. To achieve this, we have to bypass setlocale(3) check.
This commit is contained in:
parent
1105a961ca
commit
3dfa753c83
@ -1367,6 +1367,10 @@ guess_category_value (int category)
|
||||
const char *language;
|
||||
const char *retval;
|
||||
|
||||
language = getenv ("RPM_LANGUAGE_I18NSTRING");
|
||||
if (language && *language)
|
||||
return language;
|
||||
|
||||
/* The highest priority value is the `LANGUAGE' environment
|
||||
variable. But we don't use the value if the currently selected
|
||||
locale is the C locale. This is a GNU extension. */
|
||||
|
Loading…
Reference in New Issue
Block a user