[sysadmin-bin: 73/168] Use LANG=C to suppress weird character class behavior
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 73/168] Use LANG=C to suppress weird character class behavior
- Date: Thu, 24 May 2012 19:57:34 +0000 (UTC)
commit 617bc561d6baab39bc66dc981fc129aa2c226787
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Apr 1 14:06:17 2009 -0400
Use LANG=C to suppress weird character class behavior
Repository names with upper case characters were being allowed because
of localized regular expression weirdness on RHEL 5.
functions | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/functions b/functions
index 691fe03..395080a 100644
--- a/functions
+++ b/functions
@@ -5,7 +5,8 @@
# This check actually excludes some current names like gtk+ and libIDL,
# but it reflects our general policy
validate_repository_name() {
- if ! expr "$1" : "\([a-z][a-z0-9-]*\|perl-[a-zA-Z][a-zA-Z0-9-]*\)$" > /dev/null ; then
+ # character class ranges work weirdly localized for some C library versions
+ if ! LANG=C expr "$1" : "\([a-z][a-z0-9-]*\|perl-[a-zA-Z][a-zA-Z0-9-]*\)$" > /dev/null ; then
echo "'$1' is not a valid name for a GNOME project" 1>&2
exit 1
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]