[PATCH] install2: handle %_install_langs

Michael Shigorin mike at altlinux.org
Thu Sep 17 22:09:30 MSK 2020


There's no sense to have locales that the user is unable
to even choose from: one can pass lang=ab_CD by hand but
alterator-{l10n,sysinfo} just won't learn it instantly.

NB: override "%_install_langs all" that might be there,
    both lines available result in all locales installed.
---
 .../install2/install2/scripts.d/50-install2-langs        | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100755 features.in/install2/install2/scripts.d/50-install2-langs

diff --git a/features.in/install2/install2/scripts.d/50-install2-langs b/features.in/install2/install2/scripts.d/50-install2-langs
new file mode 100755
index 000000000..72788dafc
--- /dev/null
+++ b/features.in/install2/install2/scripts.d/50-install2-langs
@@ -0,0 +1,9 @@
+#!/bin/sh
+# restrict available locales to languages
+# with available alterator translations
+# (listed as of alterator-l10n 2.9.74)
+
+mkdir -p "$WORKDIR"/etc/rpm
+cat > "$WORKDIR"/etc/rpm/macros << EOF
+%_install_langs de es kk pt_BR ru tt_RU uk
+EOF
-- 
2.25.4


--WIyZ46R2i8wDzkSu--


More information about the devel-distro mailing list