From 3c537bee8d7921bc0af775fdb4d69124026532ac Mon Sep 17 00:00:00 2001 From: freswa Date: Tue, 6 Sep 2022 12:39:58 +0000 Subject: [PATCH] improve locale handling as supposed by @codefiles Add SUPPORTED file to package as done by other distributions in order to provide the set of available locales in a unmodified file. Also remove examples in locale.gen to avoid matches of tools as sed and grep. Credit @ https://github.com/archlinux/archinstall/pull/1423#issuecomment-1236515008 git-svn-id: file:///srv/repos/svn-packages/svn@455119 eb2447ed-0c53-47e4-bac8-5bc4a241df78 --- trunk/PKGBUILD | 3 +++ trunk/locale.gen.txt | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD index b3d9fcc2b759..9484704491e3 100644 --- a/trunk/PKGBUILD +++ b/trunk/PKGBUILD @@ -185,6 +185,9 @@ package_glibc() { sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \ "$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen" + # Add SUPPORTED file + install -dm644 "$srcdir"/glibc/localedata/SUPPORTED "$pkgdir"/usr/share/i18n/SUPPORTED + # install C.UTF-8 so that it is always available install -dm755 "$pkgdir/usr/lib/locale" cp -r "$srcdir/C.UTF-8" -t "$pkgdir/usr/lib/locale" diff --git a/trunk/locale.gen.txt b/trunk/locale.gen.txt index ccdd817342c7..422d281cc32d 100644 --- a/trunk/locale.gen.txt +++ b/trunk/locale.gen.txt @@ -9,12 +9,6 @@ # where is one of the locales given in /usr/share/i18n/locales # and is one of the character sets listed in /usr/share/i18n/charmaps # -# Examples: -# en_US ISO-8859-1 -# en_US.UTF-8 UTF-8 -# de_DE ISO-8859-1 -# de_DE@euro ISO-8859-15 -# # The locale-gen command will generate all the locales, # placing them in /usr/lib/locale. #