diff options
author | Joerg Bruehe <joerg.bruehe@oracle.com> | 2012-07-26 20:24:51 +0200 |
---|---|---|
committer | Joerg Bruehe <joerg.bruehe@oracle.com> | 2012-07-26 20:24:51 +0200 |
commit | d06273ef43089f95a5a46bf75a7262c5ad4e2841 (patch) | |
tree | b4bb54eba1bb436ae4ab39dccc220c9c86cd1679 /support-files | |
parent | dbfe6a6d42957a5fd0b667a7c88fab0da56e6c00 (diff) | |
download | mariadb-git-d06273ef43089f95a5a46bf75a7262c5ad4e2841.tar.gz |
Spec file polishing: Handle 'MySQL-*' and 'mysql-*', part 1
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/mysql.spec.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b627b131e71..0cd6f8dc852 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -581,8 +581,13 @@ fi # Check if we can safely upgrade. An upgrade is only safe if it's from one # of our RPMs in the same version family. +# Handle both ways of spelling the capability. installed=`rpm -q --whatprovides mysql-server 2> /dev/null` +if [ $? -ne 0 -o -z "$installed" ]; then + installed=`rpm -q --whatprovides MySQL-server 2> /dev/null` +fi if [ $? -eq 0 -a -n "$installed" ]; then + installed=`echo $installed | sed 's/\([^ ]*\) .*/\1/'` # Tests have shown duplicated package names vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1` version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1` myoldvendor='%{mysql_old_vendor}' |