From 3daac96b6839deeeba83395504f73b467ea36101 Mon Sep 17 00:00:00 2001 From: Davide Madrisan Date: Mon, 2 Jan 2012 21:16:48 +0100 Subject: [PATCH] plugins,tools,tests,libs: use LC_ALL instead of LANG Signed-off-by: Davide Madrisan --- lib/libapse.lib.in | 2 +- lib/libnetwork.lib.in | 10 +++++----- lib/libspec.lib.in | 4 ++-- plugins/config-getvar.in | 2 +- plugins/pck-extract.in | 2 +- plugins/pck-update.in | 4 ++-- plugins/spec-create.in | 20 ++++++++++---------- tests/test01_pkgquality.in | 4 ++-- tests/test02_pkgsecurity.in | 2 +- tools/extract-specs.in | 2 +- tools/kde4-flist2rpmvars.in | 2 +- unmaintained/autobuild.in | 2 +- unmaintained/autoupdate-kde.in | 2 +- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/lib/libapse.lib.in b/lib/libapse.lib.in index 728afd8..aa33c08 100644 --- a/lib/libapse.lib.in +++ b/lib/libapse.lib.in @@ -232,7 +232,7 @@ Copyright (C) 2007 Stefano Cotta Ramusino "" } 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 $"\ diff --git a/lib/libnetwork.lib.in b/lib/libnetwork.lib.in index a72d69b..d89ac7a 100644 --- a/lib/libnetwork.lib.in +++ b/lib/libnetwork.lib.in @@ -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 \ diff --git a/lib/libspec.lib.in b/lib/libspec.lib.in index 7fc4b79..2a83071 100644 --- a/lib/libspec.lib.in +++ b/lib/libspec.lib.in @@ -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 "" } 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" diff --git a/plugins/config-getvar.in b/plugins/config-getvar.in index 272b418..aec1022 100644 --- a/plugins/config-getvar.in +++ b/plugins/config-getvar.in @@ -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,\ diff --git a/plugins/pck-extract.in b/plugins/pck-extract.in index 5c5a1a8..0d5e5fe 100644 --- a/plugins/pck-extract.in +++ b/plugins/pck-extract.in @@ -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:,\ diff --git a/plugins/pck-update.in b/plugins/pck-update.in index 2f0c946..03ba585 100644 --- a/plugins/pck-update.in +++ b/plugins/pck-update.in @@ -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" diff --git a/plugins/spec-create.in b/plugins/spec-create.in index 1b410dc..af1a2cc 100644 --- a/plugins/spec-create.in +++ b/plugins/spec-create.in @@ -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="\ diff --git a/tests/test01_pkgquality.in b/tests/test01_pkgquality.in index d3a8850..ad86308 100644 --- a/tests/test01_pkgquality.in +++ b/tests/test01_pkgquality.in @@ -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 diff --git a/tests/test02_pkgsecurity.in b/tests/test02_pkgsecurity.in index 90c315f..8a0d49f 100644 --- a/tests/test02_pkgsecurity.in +++ b/tests/test02_pkgsecurity.in @@ -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 diff --git a/tools/extract-specs.in b/tools/extract-specs.in index 1668db0..c651995 100644 --- a/tools/extract-specs.in +++ b/tools/extract-specs.in @@ -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" -- "$@"` diff --git a/tools/kde4-flist2rpmvars.in b/tools/kde4-flist2rpmvars.in index a2d95fb..50f5448 100644 --- a/tools/kde4-flist2rpmvars.in +++ b/tools/kde4-flist2rpmvars.in @@ -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" -- "$@"` diff --git a/unmaintained/autobuild.in b/unmaintained/autobuild.in index 93bd873..2f9118c 100644 --- a/unmaintained/autobuild.in +++ b/unmaintained/autobuild.in @@ -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,\ diff --git a/unmaintained/autoupdate-kde.in b/unmaintained/autoupdate-kde.in index 0b502ae..71868ef 100644 --- a/unmaintained/autoupdate-kde.in +++ b/unmaintained/autoupdate-kde.in @@ -81,7 +81,7 @@ Copyright (C) 2005 Davide Madrisan "" "$"Report bugs to ." } -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