Commit 5dfaff54 authored by Julien Muchembled's avatar Julien Muchembled

erp5: buildout:extends does not work when given at command line

parent ed2407ed
......@@ -213,7 +213,7 @@ md5sum = 564006953b7d7a12d40a14b6648b32f0
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum = 77e6819ded20747d7f2fb6991d568f48
md5sum = 826e50b6465ce9e9a7534c1707e88e82
extra-context =
key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary
......
......@@ -200,9 +200,12 @@ script =
"buildout:installed=.installed-${:_buildout_section_name_}.cfg")
buildout = self.options[software_type]
# Options.get (from zc.buildout) should deserialize.
try: override = self.options["override"][software_type]
try: override = open(self.options["override"][software_type]).read()
except (KeyError, TypeError): pass
else: args.append("buildout:extends=" + buildout); buildout = override
else: \
override = "[buildout]\nextends = %%s\n\n" %% buildout + override; \
buildout = "${buildout:parts-directory}/${:_buildout_section_name_}.cfg"; \
open(buildout, "w", 0).write(override)
subprocess.check_call(args + ["-oc", buildout])
update_script = ${:script}
slapos_promise =
......
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