FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 04-12-2012, 02:54 PM
Dave Reisner
 
Default : bash version check

---
This was on the top of my parse-opts branch. Figured I'd send it along to
see if anyone else cares about this sort of thing. Easily nuked...

Since we're using associative arrays in pacman-key, 4.0 is a requirement.
However, 4.0 is also full of bugs, so Allan and I agreed that 4.1 would
be a better minimum requirement to avoid unresolvable bug reports.

configure.ac | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index a6114f8..b325fbb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -148,7 +148,15 @@ AC_PROG_AWK
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false])
-AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false])
+AC_PATH_PROGS([BASH_SHELL], [bash bash4], [false])
+
+AS_IF([test "x$BASH_SHELL" = "xfalse"],
+ AC_MSG_WARN([*** bash >= 4.1.0 is required for pacman scripts]),
+ [bash_version_majmin=`$BASH_SHELL -c 'echo "${BASH_VERSINFO[[0]]}${BASH_VERSINFO[[1]]}"'`
+ if test "$bash_version_majmin" -lt 41; then
+ AC_MSG_ERROR([*** bash >= 4.1.0 is required for pacman scripts])
+ fi
+ unset bash_version_majmin])

# find installed gettext
AM_GNU_GETTEXT([external], [need-ngettext])
--
1.7.10
 
Old 04-12-2012, 03:03 PM
Allan McRae
 
Default : bash version check

On 13/04/12 00:54, Dave Reisner wrote:
> ---
> This was on the top of my parse-opts branch. Figured I'd send it along to
> see if anyone else cares about this sort of thing. Easily nuked...
>
> Since we're using associative arrays in pacman-key, 4.0 is a requirement.
> However, 4.0 is also full of bugs, so Allan and I agreed that 4.1 would
> be a better minimum requirement to avoid unresolvable bug reports.

I agree that we agreed that 4.1 is the way to go. Bash-4.1 was released
in Jan 2010.


> configure.ac | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index a6114f8..b325fbb 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -148,7 +148,15 @@ AC_PROG_AWK
> AC_PROG_CC_C99
> AC_PROG_INSTALL
> AC_CHECK_PROGS([PYTHON], [python2.7 python2.6 python2.5 python2 python], [false])
> -AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false])
> +AC_PATH_PROGS([BASH_SHELL], [bash bash4], [false])
> +
> +AS_IF([test "x$BASH_SHELL" = "xfalse"],
> + AC_MSG_WARN([*** bash >= 4.1.0 is required for pacman scripts]),
> + [bash_version_majmin=`$BASH_SHELL -c 'echo "${BASH_VERSINFO[[0]]}${BASH_VERSINFO[[1]]}"'`
> + if test "$bash_version_majmin" -lt 41; then
> + AC_MSG_ERROR([*** bash >= 4.1.0 is required for pacman scripts])
> + fi
> + unset bash_version_majmin])
>
> # find installed gettext
> AM_GNU_GETTEXT([external], [need-ngettext])
 

Thread Tools




All times are GMT. The time now is 09:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org