Commit ec5775ec authored by Alain Takoudjou's avatar Alain Takoudjou

postgres recipe: on update or re-install generate configuration and wrapper file

If pgdata already exists, then postgres recipe will not update or install anything when buildout will run. This result to no configuration or wrapper updated if configuration changes.

For example this change:  29d1ed68  the path of `posgtres bin` is now in shared folder, then impossible to run postgres service anymore because path was not updated by buildout in wrapper.

/reviewed-on nexedi/slapos!703
parent f09ffdc9
...@@ -91,16 +91,13 @@ class Recipe(GenericBaseRecipe): ...@@ -91,16 +91,13 @@ class Recipe(GenericBaseRecipe):
# run we won't update it. # run we won't update it.
shutil.rmtree(pgdata) shutil.rmtree(pgdata)
raise raise
else:
self.createConfig()
self.createRunScript()
# install() methods usually return the pathnames of managed files.
# If they are missing, they will be rebuilt.
# In this case, we already check for the existence of pgdata,
# so we don't need to return anything here.
return [] return []
update = install
def check_exists(self, path): def check_exists(self, path):
if not os.path.isfile(path): if not os.path.isfile(path):
......
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