plugins,tools,tests,libs: use LC_ALL instead of LANG
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
4b120ef1d1
commit
3daac96b68
@ -232,7 +232,7 @@ Copyright (C) 2007 Stefano Cotta Ramusino <stefano.cotta@openmamba.org>""
|
|||||||
}
|
}
|
||||||
|
|
||||||
local ARGS
|
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: \
|
--long help,allurl,pckname:,specname:,pckurl:,pckurlverbatim:,proxy:,proxy-user: \
|
||||||
-n "$FUNCNAME" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
[ $? = 0 ] || notify.error $"\
|
[ $? = 0 ] || notify.error $"\
|
||||||
|
@ -101,7 +101,7 @@ function repository.resolveURL() {
|
|||||||
# 0 on success, 1 otherwise
|
# 0 on success, 1 otherwise
|
||||||
function repository.get_SRPMS_name() {
|
function repository.get_SRPMS_name() {
|
||||||
local ARGS
|
local ARGS
|
||||||
ARGS=`LANG=C getopt \
|
ARGS=`LC_ALL=C getopt \
|
||||||
-o n:r:p:u: \
|
-o n:r:p:u: \
|
||||||
--long urlnum:,urllist:,proxy:,proxy-user:,user: \
|
--long urlnum:,urllist:,proxy:,proxy-user:,user: \
|
||||||
-n "$FUNCNAME" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
@ -262,7 +262,7 @@ $FUNCNAME: got_SPEC_FILENAME = $got_SPEC_FILENAME"
|
|||||||
# i586:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm
|
# i586:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm
|
||||||
# ppc:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm )
|
# ppc:mbrowse-contrib-0.3.1-1qilnx.noarch.rpm )
|
||||||
function repository.get_RPMS_name() {
|
function repository.get_RPMS_name() {
|
||||||
ARGS=`LANG=C getopt \
|
ARGS=`LC_ALL=C getopt \
|
||||||
-o a:x:c:p:u: \
|
-o a:x:c:p:u: \
|
||||||
--long archlist:,exclude:,target-cpu:,proxy:,proxy-user:,user: \
|
--long archlist:,exclude:,target-cpu:,proxy:,proxy-user:,user: \
|
||||||
-n "$FUNCNAME" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
@ -434,7 +434,7 @@ ${proxy:+ --proxy ***}${proxy_user:+ --proxy-user ***}"
|
|||||||
|
|
||||||
function curl.download() {
|
function curl.download() {
|
||||||
local ARGS
|
local ARGS
|
||||||
ARGS=`LANG=C getopt \
|
ARGS=`LC_ALL=C getopt \
|
||||||
-o d:fn:o:xp:u: \
|
-o d:fn:o:xp:u: \
|
||||||
--long destdir:,force,filenum:,options:,exit-on-err,proxy:,proxy-user: \
|
--long destdir:,force,filenum:,options:,exit-on-err,proxy:,proxy-user: \
|
||||||
-n "$FUNCNAME" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
@ -576,7 +576,7 @@ ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} $file_url"
|
|||||||
#
|
#
|
||||||
function curl.upload() {
|
function curl.upload() {
|
||||||
local ARGS
|
local ARGS
|
||||||
ARGS=`LANG=C getopt \
|
ARGS=`LC_ALL=C getopt \
|
||||||
-o f:l:o:p:u:x \
|
-o f:l:o:p:u:x \
|
||||||
--long upload-file:,user:,options:,proxy:,proxy-user:,\
|
--long upload-file:,user:,options:,proxy:,proxy-user:,\
|
||||||
repository-alias:,exit-on-err,debug-unsecure \
|
repository-alias:,exit-on-err,debug-unsecure \
|
||||||
@ -658,7 +658,7 @@ ${proxy:+ --proxy $proxy}${proxyuser:+ --proxy-user $proxy_user} \
|
|||||||
#
|
#
|
||||||
function curl.ftp_command() {
|
function curl.ftp_command() {
|
||||||
local ARGS
|
local ARGS
|
||||||
ARGS=`LANG=C getopt \
|
ARGS=`LC_ALL=C getopt \
|
||||||
-o l:o:p:u:a: \
|
-o l:o:p:u:a: \
|
||||||
--long user:,options:,proxy:,proxy-user:,debug-unsecure,\
|
--long user:,options:,proxy:,proxy-user:,debug-unsecure,\
|
||||||
action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
|
action:,directory:,rename-from:,rename-to:,delete:,ftp-passive \
|
||||||
|
@ -143,7 +143,7 @@ $FUNCNAME: boolean expression [ $boolexpr ] --> ${boolstr[$retval]} ($retval)"
|
|||||||
# expr: sintax error
|
# expr: sintax error
|
||||||
function rpmvars.init() {
|
function rpmvars.init() {
|
||||||
local ARGS pckver
|
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 $"\
|
[ $? = 0 ] || notify.error $"\
|
||||||
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
|
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
|
||||||
|
|
||||||
@ -635,7 +635,7 @@ Copyright (C) 2005,2010 Davide Madrisan <davide.madrisan@gmail.com>""
|
|||||||
}
|
}
|
||||||
|
|
||||||
local ARGS
|
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" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
[ $? = 0 ] || notify.error $"\
|
[ $? = 0 ] || notify.error $"\
|
||||||
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
|
(bug)"" -- $FUNCNAME: "$"\`getopt' error"
|
||||||
|
@ -92,7 +92,7 @@ for arg in $@; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
exec_options=`LANG=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o C:DqrhV \
|
-o C:DqrhV \
|
||||||
--long eval:,config:,\
|
--long eval:,config:,\
|
||||||
debug,quiet,colorize,help,version,\
|
debug,quiet,colorize,help,version,\
|
||||||
|
@ -97,7 +97,7 @@ for arg in $@; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
exec_options=`LANG=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o xF:DqrhV \
|
-o xF:DqrhV \
|
||||||
--long \
|
--long \
|
||||||
extract,files:,destdir:,\
|
extract,files:,destdir:,\
|
||||||
|
@ -181,7 +181,7 @@ for arg in $@; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
exec_options=`LANG=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o ua:d:l:S:A:cfLRDqrhV \
|
-o ua:d:l:S:A:cfLRDqrhV \
|
||||||
--long \
|
--long \
|
||||||
update,action:,define:,login:,specfile:,arch:,\
|
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
|
# -t|--tmpdir the directory where the files will be extracted to
|
||||||
function rpms.extract() {
|
function rpms.extract() {
|
||||||
local rpminfofile tmpextractdir
|
local rpminfofile tmpextractdir
|
||||||
TEMP=`LANG=C getopt \
|
TEMP=`LC_ALL=C getopt \
|
||||||
-o i:t: --long infofile:,tmpdir: -n "$FUNCNAME" -- "$@"`
|
-o i:t: --long infofile:,tmpdir: -n "$FUNCNAME" -- "$@"`
|
||||||
[[ $? = 0 ]] || return 1
|
[[ $? = 0 ]] || return 1
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
|
@ -144,7 +144,7 @@ done
|
|||||||
# the user configuration file for @package@ is required
|
# the user configuration file for @package@ is required
|
||||||
config.check4user
|
config.check4user
|
||||||
|
|
||||||
exec_options=`LANG=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o s:n:v:t:o:DqrhV \
|
-o s:n:v:t:o:DqrhV \
|
||||||
--long \
|
--long \
|
||||||
source:,pck-name:,pck-version:,type:,output:,\
|
source:,pck-name:,pck-version:,type:,output:,\
|
||||||
@ -227,7 +227,7 @@ remember to modify the value for \`${NOTE}$id${NORM}'" ;;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function template.expand() {
|
function template.expand() {
|
||||||
local OPTIONS=`LANG=C getopt \
|
local OPTIONS=`LC_ALL=C getopt \
|
||||||
-o t:T:n:v:s:l:S:b: \
|
-o t:T:n:v:s:l:S:b: \
|
||||||
--long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\
|
--long template:,type:,pckname:,pckversion:,setupmacro:,summary:,license:,\
|
||||||
source:,standard-docs:,standard-docs-devel:,build-technology:,\
|
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##*/}
|
rm -f $tmpdir/${pck_tarball##*/}
|
||||||
|
|
||||||
local pck_rootdir_dirs=(`\
|
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\""
|
notify.debug "$FUNCNAME: pck_rootdir_dirs = \"$pck_rootdir_dirs\""
|
||||||
local pck_rootdir_files=(`\
|
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\""
|
notify.debug "$FUNCNAME: pck_rootdir_files = \"$pck_rootdir_files\""
|
||||||
|
|
||||||
# 0. set 'spec_setup_macro'
|
# 0. set 'spec_setup_macro'
|
||||||
@ -751,35 +751,35 @@ ${standard_docs_devel:+$standard_docs_devel }$currdoc"
|
|||||||
|
|
||||||
local spec_i18n="0"
|
local spec_i18n="0"
|
||||||
# note: in the 'tar' tarball there is no 'intl' folder, so we use 'po'
|
# 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"
|
spec_i18n="1"
|
||||||
|
|
||||||
# 8. check for manpages
|
# 8. check for manpages
|
||||||
|
|
||||||
local spec_manpages="0"
|
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"
|
-exec grep "MANS[ ]*=" {} \; 2>/dev/null)" ] && spec_manpages="1"
|
||||||
|
|
||||||
[ "$spec_manpages" = 0 ] &&
|
[ "$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"; }
|
-type f -name "*.[0-9]" 2>/dev/null)" ] && spec_manpages="1"; }
|
||||||
|
|
||||||
# 9. check for infopages
|
# 9. check for infopages
|
||||||
|
|
||||||
local spec_infopages="0"
|
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"
|
-exec grep "info_TEXINFOS[ ]*=" {} \; 2>/dev/null)" ] && spec_infopages="1"
|
||||||
notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
|
notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
|
||||||
|
|
||||||
[ "$spec_infopages" = 0 ] &&
|
[ "$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"; }
|
-type f -name "*.info" 2>/dev/null)" ] && spec_infopages="1"; }
|
||||||
notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
|
notify.debug "$FUNCNAME: spec_infopages = $spec_infopages"
|
||||||
|
|
||||||
# 10. check for gtk-doc documentation
|
# 10. check for gtk-doc documentation
|
||||||
|
|
||||||
local spec_gtk_doc="0"
|
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")" ] && {
|
grep -e "enable-gtk-doc")" ] && {
|
||||||
spec_gtk_doc="1"
|
spec_gtk_doc="1"
|
||||||
[ "$build_techology" = "autotools" ] && spec_cmd_configure="\
|
[ "$build_techology" = "autotools" ] && spec_cmd_configure="\
|
||||||
|
@ -21,7 +21,7 @@ function alltests() {
|
|||||||
# FIXME: add to 'po' file
|
# FIXME: add to 'po' file
|
||||||
notify.note "** ${NOTE}"$"performing quality checks""${NORM}""..."
|
notify.note "** ${NOTE}"$"performing quality checks""${NORM}""..."
|
||||||
|
|
||||||
TEMP=`LANG=C getopt \
|
TEMP=`LC_ALL=C getopt \
|
||||||
-o i:t: --long infofile:,tmpdir: \
|
-o i:t: --long infofile:,tmpdir: \
|
||||||
-n "$FUNCNAME" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
[ $? = 0 ] || return 1
|
[ $? = 0 ] || return 1
|
||||||
@ -298,7 +298,7 @@ checking packages for wrong user and/or group ownerships""${NORM}..."
|
|||||||
notify.note " - "$"checking"": \`${pck##*/}'"
|
notify.note " - "$"checking"": \`${pck##*/}'"
|
||||||
[[ -e $pck ]] || notify.error $"\
|
[[ -e $pck ]] || notify.error $"\
|
||||||
package not found"": \`${pck##*/}'"
|
package not found"": \`${pck##*/}'"
|
||||||
( LANG=C rpm -p -qlv $pck | \
|
( LC_ALL=C rpm -p -qlv $pck | \
|
||||||
while read line; do
|
while read line; do
|
||||||
set -- $line
|
set -- $line
|
||||||
# FIXME : find a better check, perhaps using a range
|
# FIXME : find a better check, perhaps using a range
|
||||||
|
@ -21,7 +21,7 @@ function alltests() {
|
|||||||
# FIXME: add to 'po' file
|
# FIXME: add to 'po' file
|
||||||
notify.note "** ${NOTE}"$"performing security checks""${NORM}""..."
|
notify.note "** ${NOTE}"$"performing security checks""${NORM}""..."
|
||||||
|
|
||||||
TEMP=`LANG=C getopt \
|
TEMP=`LC_ALL=C getopt \
|
||||||
-o i:t: --long infofile:,tmpdir: \
|
-o i:t: --long infofile:,tmpdir: \
|
||||||
-n "$FUNCNAME" -- "$@"`
|
-n "$FUNCNAME" -- "$@"`
|
||||||
[ $? = 0 ] || return 1
|
[ $? = 0 ] || return 1
|
||||||
|
@ -77,7 +77,7 @@ function usage() {
|
|||||||
|
|
||||||
[ $# -eq 0 ] && usage
|
[ $# -eq 0 ] && usage
|
||||||
|
|
||||||
TEMP=`LANG=C getopt \
|
TEMP=`LC_ALL=C getopt \
|
||||||
-o s:d:au:o:hvq \
|
-o s:d:au:o:hvq \
|
||||||
--long sourcedir:,destdir:,all,update:,owner:,help,version,quiet \
|
--long sourcedir:,destdir:,all,update:,owner:,help,version,quiet \
|
||||||
-n "$me" -- "$@"`
|
-n "$me" -- "$@"`
|
||||||
|
@ -71,7 +71,7 @@ function usage() {
|
|||||||
|
|
||||||
[ $# -eq 0 ] && usage
|
[ $# -eq 0 ] && usage
|
||||||
|
|
||||||
TEMP=`LANG=C getopt \
|
TEMP=`LC_ALL=C getopt \
|
||||||
-o shv \
|
-o shv \
|
||||||
--long nospaces,help,version \
|
--long nospaces,help,version \
|
||||||
-n "$me" -- "$@"`
|
-n "$me" -- "$@"`
|
||||||
|
@ -101,7 +101,7 @@ for arg in $@; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
exec_options=`LANG=C getopt \
|
exec_options=`LC_ALL=C getopt \
|
||||||
-o b:T:DqrhV \
|
-o b:T:DqrhV \
|
||||||
--long batch:,target:,\
|
--long batch:,target:,\
|
||||||
debug,quiet,colorize,help,version,\
|
debug,quiet,colorize,help,version,\
|
||||||
|
@ -81,7 +81,7 @@ Copyright (C) 2005 Davide Madrisan <davide.madrisan@qilinux.it>""
|
|||||||
"$"Report bugs to <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" -- "$@"`
|
--long build,check,download,install,upload,pcklist:,help -n "$me" -- "$@"`
|
||||||
[ $? = 0 ] || return 1
|
[ $? = 0 ] || return 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user