From e7a0af8b60c987e56a690d63a17ae0e0d1bc4a33 Mon Sep 17 00:00:00 2001 From: Finn Smith Date: Wed, 19 Feb 2014 13:51:15 -0500 Subject: Fix datadir.mkpath for bottled mysql server Moved datadir.mkpath (i.e. the creation of var/mysql) to the post_install function. This ensures that the path is created with both compiled and bottled percona-server. Without this fix when this formula is bottled it errors on install. Closes #26841. Signed-off-by: Adam Vandenberg --- Library/Formula/mysql.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Library') diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb index 0b0ff2f93..f054e43f9 100644 --- a/Library/Formula/mysql.rb +++ b/Library/Formula/mysql.rb @@ -118,12 +118,11 @@ class Mysql < Formula libexec.mkpath mv "#{bin}/mysqlaccess", libexec mv "#{bin}/mysqlaccess.conf", libexec - - # Make sure the var/mysql directory exists - (var+"mysql").mkpath end def post_install + # Make sure the var/mysql directory exists + (var+"mysql").mkpath unless File.exist? "#{var}/mysql/mysql/user.frm" ENV['TMPDIR'] = nil system "#{bin}/mysql_install_db", '--verbose', "--user=#{ENV['USER']}", -- cgit v1.2.3