Bug #831

ryzom/code/nelns/automacros/mysql.m4 does not parse versions correctly

Added by jeremyhu over 8 years ago. Updated over 7 years ago.

Status:New Start date:05/06/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Build
Target version:-

Description

1) ryzom/code/nelns/automacros/mysql.m4 does not parse versions correctly:
MYSQL_VERSION='5.1.46'
mysql_version_major=`expr $MYSQL_VERSION : '\(0-9*\)'`
mysql_version_minor=`expr $MYSQL_VERSION : '0-9*\.\(0-9*\)'`
mysql_version_micro=`expr $MYSQL_VERSION : '0-9*\.0-9*\.\(0-9*\)'`
set | grep mysql
mysql_version_major=5
mysql_version_micro=4
mysql_version_minor=1

This parsing issue has actually resulted in the requested version having an unset variable which then results in "no" for all checks.

mysql.m4.diff (1.5 kB) Magnifier kerozcak, 09/06/2010 05:44 pm

History

#1 Updated by vl over 8 years ago

Do you have a patch for this?

#2 Updated by vl over 8 years ago

  • Target version set to Version 0.8.0

#3 Updated by kerozcak almost 8 years ago

I'm not regexp master, but changing 0-9 to [0-9] helped:
export MYSQL_VERSION='5.1.46'
mysql_version_major=`expr $MYSQL_VERSION : '\([0-9]*\)'`
mysql_version_minor=`expr $MYSQL_VERSION : '[0-9]*\.\([0-9]*\)'`
mysql_version_micro=`expr $MYSQL_VERSION : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
set | grep mysql

mysql_version_major=5
mysql_version_micro=46
mysql_version_minor=1

Patch attached.

#4 Updated by kervala over 7 years ago

  • Target version deleted (Version 0.8.0)

Also available in: Atom PDF