summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-11-22 12:22:06 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-11-22 12:32:36 +0200
commit37ceae439ede3a64e9d010f1082897acd3621e56 (patch)
treeb9dfdce8d86a26500c70615d448b252865a73124
parent224b94f34918192984a2e8909c2664f661483efd (diff)
downloadrpm-37ceae439ede3a64e9d010f1082897acd3621e56.tar.gz
rpm-37ceae439ede3a64e9d010f1082897acd3621e56.tar.bz2
rpm-37ceae439ede3a64e9d010f1082897acd3621e56.zip
Avoid locale issues in rpm2cpio.sh (RhBug:878363)
- In gawk >= 4.0.x printf() "adjusts" things according to current locale, but we need the data as it is. Forcing C locale prevents gawk from getting funny ideas about character conversions... (cherry picked from commit c0e95f1cedefd6d7522ef2cf7a2ada7c83821596)
-rwxr-xr-xscripts/rpm2cpio.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/rpm2cpio.sh b/scripts/rpm2cpio.sh
index 57c47bb49..cb93ead8a 100755
--- a/scripts/rpm2cpio.sh
+++ b/scripts/rpm2cpio.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+# Prevent gawk >= 4.0.x from getting funny ideas wrt UTF in printf()
+LANG=C
+
pkg=$1
if [ "$pkg" = "" -o ! -e "$pkg" ]; then
echo "no package supplied" 1>&2