Commit 48c6bc04 authored by Vitaly Lipatov's avatar Vitaly Lipatov

use LC_ALL=C instead of LANG=C

parent a225df3a
......@@ -862,7 +862,7 @@ get_virt()
fi
# use util-linux
if LANG=C a= lscpu | grep "Hypervisor vendor:" | grep -q "KVM" ; then
if LC_ALL=C a= lscpu | grep "Hypervisor vendor:" | grep -q "KVM" ; then
echo "kvm" && return
fi
......
......@@ -28,7 +28,7 @@ try_fix_apt_rpm_dupls()
sudocmd epm remove --auto $TESTPKG || return
fi
local PKGLIST
PKGLIST=$(LANG=C sudorun apt-get install $TESTPKG 2>&1 | grep "W: There are multiple versions of" | \
PKGLIST=$(LC_ALL=C sudorun apt-get install $TESTPKG 2>&1 | grep "W: There are multiple versions of" | \
sed -e 's|W: There are multiple versions of "\(.*\)" in your system.|\1|')
local TODEL
for i in $PKGLIST ; do
......
......@@ -290,7 +290,7 @@ epm_ni_install_names()
__epm_check_if_rpm_already_installed()
{
# Not: we can make optimize if just check version?
LANG=C sudorun rpm -Uvh --test "$@" 2>&1 | grep -q "is already installed"
LC_ALL=C sudorun rpm -Uvh --test "$@" 2>&1 | grep -q "is already installed"
}
__handle_direct_install()
......
......@@ -108,8 +108,8 @@ __filter_by_installed_packages()
remove_on_exit $pkglist
# get intersect between full package list and available packages table
epm --short packages | LANG=C sort -u >$pkglist
LANG=C join -11 -21 $tapt $pkglist | uniq
epm --short packages | LC_ALL=C sort -u >$pkglist
LC_ALL=C join -11 -21 $tapt $pkglist | uniq
rm -f $pkglist
# rpm on Fedora/CentOS no more print missed packages to stderr
......@@ -125,7 +125,7 @@ __get_installed_table()
local tapt
tapt="$(mktemp)" || fatal
remove_on_exit $tapt
__list_app_packages_table | LANG=C sort -u >$tapt
__list_app_packages_table | LC_ALL=C sort -u >$tapt
__filter_by_installed_packages $tapt
rm -f $tapt
}
......
......@@ -40,7 +40,7 @@ get_linked_shared_libs()
assure_exists readelf binutils
#is_command readelf || fatal "Can't get required shared library: readelf is missed. Try install binutils package."
#ldd "$exe" | sed -e 's|[[:space:]]*||' | grep "^lib.*[[:space:]]=>[[:space:]]\(/usr/lib\|/lib\)" | sed -e 's|[[:space:]].*||'
LANG=C readelf -d "$1" | grep "(NEEDED)" | grep "Shared library:" | sed -e 's|.*Shared library: \[||' -e 's|\]$||' | grep "^lib"
LC_ALL=C readelf -d "$1" | grep "(NEEDED)" | grep "Shared library:" | sed -e 's|.*Shared library: \[||' -e 's|\]$||' | grep "^lib"
}
__epm_elf32_requires()
......@@ -92,7 +92,7 @@ epm_requires_files()
;;
eopkg)
showcmd eopkg info $pkg_files
LANG=C eopkg info $pkg_files | grep "^Dependencies" | head -n1 | sed -e "s|Dependencies[[:space:]]*: ||"
LC_ALL=C eopkg info $pkg_files | grep "^Dependencies" | head -n1 | sed -e "s|Dependencies[[:space:]]*: ||"
;;
ELF)
__epm_elf_requires $pkg_files
......@@ -123,9 +123,9 @@ case $PMTYPE in
CMD="apt-cache depends"
else
if [ -n "$short" ] ; then
LANG=C docmd apt-cache depends $pkg_names | grep "Depends:" | sed -e 's|, |\n|g' -e "s|.*Depends: ||" -e "s|<\(.*\)>|\1|" | __epm_filter_out_base_alt_reqs | sed -e "s| .*||"
LC_ALL=C docmd apt-cache depends $pkg_names | grep "Depends:" | sed -e 's|, |\n|g' -e "s|.*Depends: ||" -e "s|<\(.*\)>|\1|" | __epm_filter_out_base_alt_reqs | sed -e "s| .*||"
else
LANG=C docmd apt-cache depends $pkg_names | grep "Depends:" | sed -e 's|, |\n|g' -e "s|.*Depends: ||" -e "s|<\(.*\)>|\1|" | __epm_filter_out_base_alt_reqs
LC_ALL=C docmd apt-cache depends $pkg_names | grep "Depends:" | sed -e 's|, |\n|g' -e "s|.*Depends: ||" -e "s|<\(.*\)>|\1|" | __epm_filter_out_base_alt_reqs
fi
return
fi
......@@ -186,7 +186,7 @@ case $PMTYPE in
;;
eopkg)
showcmd eopkg info $pkg_names
LANG=C eopkg info $pkg_names | grep "^Dependencies" | sed -e "s|Dependencies[[:space:]]*: ||"
LC_ALL=C eopkg info $pkg_names | grep "^Dependencies" | sed -e "s|Dependencies[[:space:]]*: ||"
return
;;
xbps)
......
......@@ -93,7 +93,7 @@ case $PMTYPE in
if [ -n "$verbose" ] ; then
CMD="/usr/sbin/slackpkg search"
else
LANG=C docmd /usr/sbin/slackpkg search $string | grep " - " | sed -e 's|.* - ||g'
LC_ALL=C docmd /usr/sbin/slackpkg search $string | grep " - " | sed -e 's|.* - ||g'
return
fi
;;
......@@ -126,7 +126,7 @@ case $PMTYPE in
;;
esac
LANG=C docmd $CMD $string
LC_ALL=C docmd $CMD $string
epm play $short --list-all | sed -e 's|^ *||g' -e 's|[[:space:]]\+| |g' -e "s|\$| (use \'epm play\' to install it)|"
}
......
......@@ -274,7 +274,7 @@ store_output()
local CMDSTATUS=$RC_STDOUT.pipestatus
echo 1 >$CMDSTATUS
#RC_STDERR=$(mktemp)
( LANG=C $@ 2>&1 ; echo $? >$CMDSTATUS ) | tee $RC_STDOUT
( LC_ALL=C $@ 2>&1 ; echo $? >$CMDSTATUS ) | tee $RC_STDOUT
return "$(cat $CMDSTATUS)"
# bashism
# http://tldp.org/LDP/abs/html/bashver3.html#PIPEFAILREF
......
......@@ -22,7 +22,7 @@ load_helper epm-query
__fast_hack_for_filter_out_installed_rpm()
{
LANG=C LC_ALL=C xargs -n1 rpm -q 2>&1 | grep 'is not installed' |
LC_ALL=C xargs -n1 rpm -q 2>&1 | grep 'is not installed' |
sed -e 's|^.*package \(.*\) is not installed.*|\1|g'
}
......
......@@ -83,7 +83,7 @@ case $PMTYPE in
eopkg)
showcmd eopkg info $pkg
# eopkg info prints it only from repo info
LANG=C eopkg info $pkg | grep "^Reverse Dependencies" | sed -e "s|Reverse Dependencies[[:space:]]*: ||" | grep -v "^$"
LC_ALL=C eopkg info $pkg | grep "^Reverse Dependencies" | sed -e "s|Reverse Dependencies[[:space:]]*: ||" | grep -v "^$"
return
;;
xbps)
......
......@@ -32,7 +32,7 @@ case $PMTYPE in
CMD="conary repquery --what-provides"
;;
apt-rpm|apt-dpkg|aptitude-dpkg)
LANG=C docmd apt-get install --print-uris $pkg | grep "^Selecting" | cut -f2 -d" "
LC_ALL=C docmd apt-get install --print-uris $pkg | grep "^Selecting" | cut -f2 -d" "
return
;;
yum-rpm)
......
......@@ -62,7 +62,7 @@ is_service_autostart()
fi
# FIXME: check for current runlevel
LANG=C sudorun chkconfig $1 --list | grep -q "[35]:on"
LC_ALL=C sudorun chkconfig $1 --list | grep -q "[35]:on"
;;
service-initd|service-update)
test -L "$(echo /etc/rc5.d/S??$1)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment