[Rt-commit] rt branch, 4.0/empty-database-name, created. rt-4.0.2-123-gf03701d

Alex Vandiver alexmv at bestpractical.com
Thu Sep 29 18:03:06 EDT 2011


The branch, 4.0/empty-database-name has been created
        at  f03701d89fdff48a95cbe462b0e048c75488b1e8 (commit)

- Log -----------------------------------------------------------------
commit bf59adf66b8629e91c926ab17b1ccc357aeba9fc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Sep 29 17:48:58 2011 -0400

    configure: There is no need to pull in an awk dependency, use perl

diff --git a/configure.ac b/configure.ac
index 8048469..4031734 100755
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,6 @@ test "x$rt_version_patch" = 'x' && rt_version_patch=0
 
 dnl Check for programs
 AC_PROG_INSTALL
-AC_PROG_AWK
 AC_ARG_VAR([PERL],[Perl interpreter command])
 AC_PATH_PROG([PERL], [perl], [not found])
 if test "$PERL" = 'not found'; then
@@ -230,7 +229,7 @@ AC_ARG_WITH(my-user-group,
 # Test for valid database names
 AS_IF([ test "$DB_TYPE" = "mysql" ],
       [ AC_MSG_CHECKING([if database name is valid])
-          AS_IF([ echo $DB_DATABASE | $AWK '/-/ { exit 1 }' ],
+          AS_IF([ echo $DB_DATABASE | $PERL -e 'exit(1) if <> =~ /-/'],
                 [ AC_MSG_RESULT([yes]) ],
                 [ AC_MSG_ERROR([no.  database name ($DB_DATABASE) contains '-' which is not valid for mysql]) ]
                )

commit f03701d89fdff48a95cbe462b0e048c75488b1e8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Sep 29 17:49:26 2011 -0400

    configure: Enforce that there be a non-empty database name at configure-time

diff --git a/configure.ac b/configure.ac
index 4031734..1f4f962 100755
--- a/configure.ac
+++ b/configure.ac
@@ -227,6 +227,12 @@ AC_ARG_WITH(my-user-group,
             WEB_GROUP=$my_group)
 
 # Test for valid database names
+AC_MSG_CHECKING([if database name is set])
+          AS_IF([ echo $DB_DATABASE | $PERL -e 'exit(1) unless <> =~ /\S/' ],
+                [ AC_MSG_RESULT([yes]) ],
+                [ AC_MSG_ERROR([no.  database name is not set]) ]
+               )
+
 AS_IF([ test "$DB_TYPE" = "mysql" ],
       [ AC_MSG_CHECKING([if database name is valid])
           AS_IF([ echo $DB_DATABASE | $PERL -e 'exit(1) if <> =~ /-/'],

-----------------------------------------------------------------------


More information about the Rt-commit mailing list