[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[atomic-devel] [PATCH] treecompose-post: Fix locale dropping by forcing text grep



It looks like glibc's locales at some point gained "français" as a
locale with UTF-8 encoding.  When we're doing the processing here, a
locale is not set, so grep doesn't recognize the UTF-8 and just
outputs "(Binary file matches)" which obviously breaks things.

Fix this by forcing grep to treat input as text.
---
 treecompose-post.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/treecompose-post.sh b/treecompose-post.sh
index b7633ec..73b6573 100755
--- a/treecompose-post.sh
+++ b/treecompose-post.sh
@@ -5,6 +5,6 @@ set -e
 # See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816
 KEEPLANG=en_US
 find /usr/share/locale -mindepth  1 -maxdepth 1 -type d -not -name "${KEEPLANG}" -exec rm -rf {} +
-localedef --list-archive | grep -v ^"${KEEPLANG}" | xargs localedef --delete-from-archive
+localedef --list-archive | grep -a -v ^"${KEEPLANG}" | xargs localedef --delete-from-archive
 mv -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
 build-locale-archive
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]