summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-11-22 12:22:06 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-12-07 14:35:32 +0200
commitb36e8ac5f58869d13f6c36680b475a9f3b570cee (patch)
tree71b07fc341097b851f8ff4451c667e39b12a92bb
parentceea15bddcc4e4418d90db92b1e2a529ee3cadfb (diff)
downloadrpm-b36e8ac5f58869d13f6c36680b475a9f3b570cee.tar.gz
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