plugins,tools,tests,libs: use LC_ALL instead of LANG

Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
Davide Madrisan 2012-01-02 21:16:48 +01:00
parent 4b120ef1d1
commit 3daac96b68
13 changed files with 29 additions and 29 deletions

View File

@ -232,7 +232,7 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
}
local ARGS
ARGS=`LANG=C getopt -o han:s:w:p:u: \
ARGS=`LC_ALL=C getopt -o han:s:w:p:u: \
--long help,allurl,pckname:,specname:,pckurl:,pckurlverbatim:,proxy:,proxy-user: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"\

View File

@ -101,7 +101,7 @@ function repository.resolveURL() {
# 0 on success, 1 otherwise
function repository.get_SRPMS_name() {
local ARGS
ARGS=`LANG=C getopt \
ARGS=`LC_ALL=C getopt \
-o n:r:p:u: \
--long urlnum:,urllist:,proxy:,proxy-user:,user: \
-n "$FUNCNAME" -- "$@"`
@ -262,7 +262,7 @@ $FUNCNAME: got_SPEC_FILENAME = $got_SPEC_FILENAME"
# i586:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm
# ppc:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm )
function repository.get_RPMS_name() {
ARGS=`LANG=C getopt \
ARGS=`LC_ALL=C getopt \
-o a:x:c:p:u: \
--long archlist:,exclude:,target-cpu:,proxy:,proxy-user:,user: \
-n "$FUNCNAME" -- "$@"`
@ -434,7 +434,7 @@ ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
function curl.download() {
local ARGS
ARGS=`LANG=C getopt \
ARGS=`LC_ALL=C getopt \
-o d:fn:o:xp:u: \
--long destdir:,force,filenum:,options:,exit-on-err,proxy:,proxy-user: \
-n "$FUNCNAME" -- "$@"`
@ -576,7 +576,7 @@ ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} $file_url"
#
function curl.upload() {
local ARGS
ARGS=`LANG=C getopt \
ARGS=`LC_ALL=C getopt \
-o f:l:o:p:u:x \
--long upload-file:,user:,options:,proxy:,proxy-user:,\
repository-alias:,exit-on-err,debug-unsecure \
@ -658,7 +658,7 @@ ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} \
#
function curl.ftp_command() {
local ARGS
ARGS=`LANG=C getopt \
ARGS=`LC_ALL=C getopt \
-o l:o:p:u:a: \
--long user:,options:,proxy:,proxy-user:,debug-unsecure,\
action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \

View File

@ -143,7 +143,7 @@ $FUNCNAME: boolean expression [ $boolexpr ] --> ${boolstr[$retval]} ($retval)"
# expr: sintax error
function rpmvars.init() {
local ARGS pckver
ARGS=`LANG=C getopt -o cv: --long clear,pckver: -n "$FUNCNAME" -- "$@"`
ARGS=`LC_ALL=C getopt -o cv: --long clear,pckver: -n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
@ -635,7 +635,7 @@ Copyright (C) 2005,2010 Davide Madrisan <davide.madrisan@gmail.com>""
}
local ARGS
ARGS=`LANG=C getopt -o hs:v --long help,specfile:,verbatim \
ARGS=`LC_ALL=C getopt -o hs:v --long help,specfile:,verbatim \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || notify.error $"\
(bug)"" -- $FUNCNAME: "$"\`getopt' error"

View File

@ -92,7 +92,7 @@ for arg in $@; do
esac
done
exec_options=`LANG=C getopt \
exec_options=`LC_ALL=C getopt \
-o C:DqrhV \
--long eval:,config:,\
debug,quiet,colorize,help,version,\

View File

@ -97,7 +97,7 @@ for arg in $@; do
esac
done
exec_options=`LANG=C getopt \
exec_options=`LC_ALL=C getopt \
-o xF:DqrhV \
--long \
extract,files:,destdir:,\

View File

@ -181,7 +181,7 @@ for arg in $@; do
esac
done
exec_options=`LANG=C getopt \
exec_options=`LC_ALL=C getopt \
-o ua:d:l:S:A:cfLRDqrhV \
--long \
update,action:,define:,login:,specfile:,arch:,\
@ -2535,7 +2535,7 @@ $pck-$pck_rpmversion-$pck_rpmrelease$DISTRO_rpm.$target_cpu.rpm"
# -t|--tmpdir the directory where the files will be extracted to
function rpms.extract() {
local rpminfofile tmpextractdir
TEMP=`LANG=C getopt \
TEMP=`LC_ALL=C getopt \
-o i:t: --long infofile:,tmpdir: -n "$FUNCNAME" -- "$@"`
[[ $? = 0 ]] || return 1
eval set -- "$TEMP"

View File

@ -144,7 +144,7 @@ done
# the user configuration file for @package@ is required
config.check4user
exec_options=`LANG=C getopt \
exec_options=`LC_ALL=C getopt \
-o s:n:v:t:o:DqrhV \
--long \
source:,pck-name:,pck-version:,type:,output:,\
@ -227,7 +227,7 @@ remember to modify the value for \`${NOTE}$id${NORM}'" ;;
}
function template.expand() {
local OPTIONS=`LANG=C getopt \
local OPTIONS=`LC_ALL=C getopt \
-o t:T:n:v:s:l:S:b: \
--long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\
source:,standard-docs:,standard-docs-devel:,build-technology:,\
@ -579,10 +579,10 @@ python modules must have this name structure (use \`-n'):"" \
rm -f $tmpdir/${pck_tarball##*/}
local pck_rootdir_dirs=(`\
LANG=C find $tmpdir -mindepth 1 -maxdepth 1 -type d -printf "%f "`)
LC_ALL=C find $tmpdir -mindepth 1 -maxdepth 1 -type d -printf "%f "`)
notify.debug "$FUNCNAME: pck_rootdir_dirs = \"$pck_rootdir_dirs\""
local pck_rootdir_files=(`\
LANG=C find $tmpdir -mindepth 1 -maxdepth 1 -type f -printf "%f "`)
LC_ALL=C find $tmpdir -mindepth 1 -maxdepth 1 -type f -printf "%f "`)
notify.debug "$FUNCNAME: pck_rootdir_files = \"$pck_rootdir_files\""
# 0. set 'spec_setup_macro'
@ -751,35 +751,35 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
local spec_i18n="0"
# note: in the 'tar' tarball there is no 'intl' folder, so we use 'po'
[ "$(LANG=C find $tmpdir/$pck_rootdir/ -type d -name po 2>/dev/null)" ] &&
[ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -type d -name po 2>/dev/null)" ] &&
spec_i18n="1"
# 8. check for manpages
local spec_manpages="0"
[ "$(LANG=C find $tmpdir/$pck_rootdir/ -name Makefile.am \
[ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -name Makefile.am \
-exec grep "MANS[ ]*=" {} \; 2>/dev/null)" ] && spec_manpages="1"
[ "$spec_manpages" = 0 ] &&
{ [ "$(LANG=C find $tmpdir/$pck_rootdir/ \
{ [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ \
-type f -name "*.[0-9]" 2>/dev/null)" ] && spec_manpages="1"; }
# 9. check for infopages
local spec_infopages="0"
[ "$(LANG=C find $tmpdir/$pck_rootdir/ -name Makefile.am \
[ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ -name Makefile.am \
-exec grep "info_TEXINFOS[ ]*=" {} \; 2>/dev/null)" ] && spec_infopages="1"
notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
[ "$spec_infopages" = 0 ] &&
{ [ "$(LANG=C find $tmpdir/$pck_rootdir/ \
{ [ "$(LC_ALL=C find $tmpdir/$pck_rootdir/ \
-type f -name "*.info" 2>/dev/null)" ] && spec_infopages="1"; }
notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
# 10. check for gtk-doc documentation
local spec_gtk_doc="0"
[ "$(LANG=C $tmpdir/$pck_rootdir/configure --help 2>/dev/null | \
[ "$(LC_ALL=C $tmpdir/$pck_rootdir/configure --help 2>/dev/null | \
grep -e "enable-gtk-doc")" ] && {
spec_gtk_doc="1"
[ "$build_techology" = "autotools" ] && spec_cmd_configure="\

View File

@ -21,7 +21,7 @@ function alltests() {
# FIXME: add to 'po' file
notify.note "** ${NOTE}"$"performing quality checks""${NORM}""..."
TEMP=`LANG=C getopt \
TEMP=`LC_ALL=C getopt \
-o i:t: --long infofile:,tmpdir: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || return 1
@ -298,7 +298,7 @@ checking packages for wrong user and/or group ownerships""${NORM}..."
notify.note " - "$"checking"": \`${pck##*/}'"
[[ -e $pck ]] || notify.error $"\
package not found"": \`${pck##*/}'"
( LANG=C rpm -p -qlv $pck | \
( LC_ALL=C rpm -p -qlv $pck | \
while read line; do
set -- $line
# FIXME : find a better check, perhaps using a range

View File

@ -21,7 +21,7 @@ function alltests() {
# FIXME: add to 'po' file
notify.note "** ${NOTE}"$"performing security checks""${NORM}""..."
TEMP=`LANG=C getopt \
TEMP=`LC_ALL=C getopt \
-o i:t: --long infofile:,tmpdir: \
-n "$FUNCNAME" -- "$@"`
[ $? = 0 ] || return 1

View File

@ -77,7 +77,7 @@ function usage() {
[ $# -eq 0 ] && usage
TEMP=`LANG=C getopt \
TEMP=`LC_ALL=C getopt \
-o s:d:au:o:hvq \
--long sourcedir:,destdir:,all,update:,owner:,help,version,quiet \
-n "$me" -- "$@"`

View File

@ -71,7 +71,7 @@ function usage() {
[ $# -eq 0 ] && usage
TEMP=`LANG=C getopt \
TEMP=`LC_ALL=C getopt \
-o shv \
--long nospaces,help,version \
-n "$me" -- "$@"`

View File

@ -101,7 +101,7 @@ for arg in $@; do
esac
done
exec_options=`LANG=C getopt \
exec_options=`LC_ALL=C getopt \
-o b:T:DqrhV \
--long batch:,target:,\
debug,quiet,colorize,help,version,\

View File

@ -81,7 +81,7 @@ Copyright (C) 2005 Davide Madrisan <davide.madrisan@qilinux.it>""
"$"Report bugs to <davide.madrisan@qilinux.it>."
}
OPTS=`LANG=C getopt -o bcdiup:h \
OPTS=`LC_ALL=C getopt -o bcdiup:h \
--long build,check,download,install,upload,pcklist:,help -n "$me" -- "$@"`
[ $? = 0 ] || return 1