stages/rpm: new option to set _install_langs
RPM supports installing only specific locales by setting the `_install_langs` macro.
This commit is contained in:
parent
a6e7070b13
commit
34ebe60bf0
1 changed files with 17 additions and 0 deletions
|
|
@ -133,6 +133,15 @@ SCHEMA_2 = """
|
|||
"default": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"install_langs": {
|
||||
"description": "Only install certain locales (sets `_install_langs` RPM macro)",
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -282,6 +291,14 @@ def main(tree, inputs, options):
|
|||
if no_dracut:
|
||||
masked_files = disable_dracut(tree)
|
||||
|
||||
langs = options.get("install_langs")
|
||||
if langs:
|
||||
macro = "%_install_langs " + ":".join(langs)
|
||||
print(f"using '{macro}'")
|
||||
extra_args += [
|
||||
"--define", macro,
|
||||
]
|
||||
|
||||
with tempfile.NamedTemporaryFile(prefix="manifest.", mode='w') as manifest:
|
||||
manifest.writelines(c+'\n' for c in packages)
|
||||
manifest.flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue