Commit dde27023 authored by Romain Courteaud's avatar Romain Courteaud

Create bt5 repositories

parent f0e7b9a3
......@@ -283,6 +283,27 @@ class Recipe(slapos.recipe.erp5.Recipe):
))
return self.path_list
def installBT5Repo(self):
"""
Create read only repo in the partition, to ease ERP5 configuration
"""
repo_path = os.path.join(self.var_directory, "bt5repo")
if not os.path.isdir(repo_path):
os.mkdir(repo_path)
for repo in self.options.get('bt5_repo_list', '').splitlines():
if not repo:
continue
target, linkname = linkline.split()
link = os.path.join(repo_path, linkname)
if os.path.lexists(link):
if not os.path.islink(link):
raise zc.buildout.UserError(
'Target link already %r exists but it is not link' % link)
os.unlink(link)
os.symlink(target, link)
self.logger.debug('Created link %r -> %r' % (link, target))
self.path_list.append(repo_path)
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set()
......@@ -294,6 +315,7 @@ class Recipe(slapos.recipe.erp5.Recipe):
'killpidfromfile')], self.ws, sys.executable, self.bin_directory)[0]
self.path_list.append(self.killpidfromfile)
self.linkBinary()
self.installBT5Repo()
if self.parameter_dict.get('development', 'false').lower() == 'true':
self.development = True
return self.installDevelopmentEnvironment()
......
......@@ -59,6 +59,11 @@ link_binary_list =
${xpdf:location}/bin/pdftotext
${xtrabackup:location}/bin/xtrabackup_51
bt5_repo_list =
${erp5:location}/product/ERP5/bootstrap bt5bootstrap
${erp5:location}/bt5 bt5erp5
${bt5-bef:location} bt5bef
# XXX: products won't be needed as soon as all ERP5 (and products-deps)
# products will be eggified so then it will be possible to use them thanks to
# availability in software's eggs
......
......@@ -10,6 +10,8 @@ parts +=
mysql-tritonn-5.0
products-bef
products-upgrade
bt5-bef
bt5-repository
[eggs]
# Just so buildout executes [bef_erp5-recipe] before [eggs], as
......@@ -30,7 +32,7 @@ extra-paths +=
[template]
url = ${:_profile_base_location_}/instance.cfg
md5sum = 8ed5e0c3dcbde0f88e18dba0d364fabf
md5sum = 9487896be21080323462a5f289db6c5e
[instance-recipe]
egg = slapos.cookbook
......@@ -47,6 +49,14 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
update-command = ${:command}
[bt5-repository]
recipe = plone.recipe.command
stop-on-error = true
command =
${erp5:location}/product/ERP5/bin/genbt5list ${erp5:location}/product/ERP5/bootstrap ${erp5:location}/bt5 ${bt5-bef:location}
update-command = ${:command}
[bt5-bef]
<= bef-svn-template
command =
......
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