From a96f1b9ac7f505865ffaf9ee9ac1a375c9b959be Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sun, 19 Jul 2009 12:43:11 +0200 Subject: use LANG=C when parsing aif output. Fixes FS#14852 --- src/aif.sh | 1 + src/core/libs/lib-pacman.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 }'` } -- cgit v1.2.3-54-g00ecf