summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-07-19 12:43:11 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-07-19 12:43:11 +0200
commita96f1b9ac7f505865ffaf9ee9ac1a375c9b959be (patch)
treed9839c122fc43aac21a3116f10d3fb255515c40b
parentb668472a5f68a139e47516f70df94b2a327c16d0 (diff)
use LANG=C when parsing aif output. Fixes FS#14852
-rwxr-xr-xsrc/aif.sh1
-rw-r--r--src/core/libs/lib-pacman.sh2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/aif.sh b/src/aif.sh
index ec1b612..e58815f 100755
--- a/src/aif.sh
+++ b/src/aif.sh
@@ -128,6 +128,7 @@ done
# Set pacman vars. allow procedures to have set $var_TARGET_DIR (TODO: look up how delayed variable substitution works. then we can put this at the top again)
# flags like --noconfirm should not be specified here. it's up to the procedure to decide the interactivity
+# NOTE: Pacman will run with currently active locale, if you want to parse output, you should prefix with LANG=C
PACMAN=pacman
PACMAN_TARGET="pacman --root $var_TARGET_DIR --config /tmp/pacman.conf"
diff --git a/src/core/libs/lib-pacman.sh b/src/core/libs/lib-pacman.sh
index a104cee..19e2eca 100644
--- a/src/core/libs/lib-pacman.sh
+++ b/src/core/libs/lib-pacman.sh
@@ -157,5 +157,5 @@ list_packages ()
# TODO: check $1
which_group ()
{
- PACKAGE_GROUPS=`$PACMAN_TARGET -Si $1| awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'`
+ PACKAGE_GROUPS=`LANG=C $PACMAN_TARGET -Si $1| awk '/^Name/{ printf("%s ",$3) } /^Group/{ print $3 }'`
}