Commit 4d15f8ba authored by Viktor Horvath's avatar Viktor Horvath

Delete Apache config files from compilation time

so that they get regenerated with the right paths at instantiation time.
parent c23d9919
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import os import os
import pprint import pprint
import re import re
import shutil
import stat import stat
import subprocess import subprocess
...@@ -40,6 +41,10 @@ class Recipe(GenericBaseRecipe): ...@@ -40,6 +41,10 @@ class Recipe(GenericBaseRecipe):
- call "make install-all" - call "make install-all"
""" """
def removeIfExisting(self, filepath):
if os.path.isfile(filepath):
os.remove(filepath)
def install(self): def install(self):
print "This is the Mioga recipe" print "This is the Mioga recipe"
print "Looking for compile folder:" print "Looking for compile folder:"
...@@ -67,8 +72,10 @@ class Recipe(GenericBaseRecipe): ...@@ -67,8 +72,10 @@ class Recipe(GenericBaseRecipe):
fm.modify('db_port', self.options['db_port']) fm.modify('db_port', self.options['db_port'])
# db_name, dbi_login are standard # db_name, dbi_login are standard
fm.save() fm.save()
if os.path.isfile("config.mk"): # Ensure no old data is kept
os.remove("config.mk") # otherwise we don't see the values in the Makefiles self.removeIfExisting('config.mk')
if os.path.isdir('web/conf/apache'):
shutil.rmtree('web/conf/apache')
environ = os.environ environ = os.environ
environ['PATH'] = ':'.join([self.options['perl_bin'], # priority! environ['PATH'] = ':'.join([self.options['perl_bin'], # priority!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment