MySQL : self.egg.working_set([__name__]) does not work : __name__ is...

MySQL : self.egg.working_set([__name__]) does not work : __name__ is 'slapos.recipe.mysql' but this egg does not exist so buildout fails miserably while finding a distribution 'slapos.recipe.mysql'. slapos.cookbook exists. ugly workaround.
parent 5c64b7a3
......@@ -29,7 +29,6 @@ import os
import pkg_resources
import sys
import zc.buildout
import zc.recipe.egg
class Recipe(BaseSlapRecipe):
def getTemplateFilename(self, template_name):
......@@ -38,7 +37,13 @@ class Recipe(BaseSlapRecipe):
def _install(self):
self.path_list = []
self.requirements, self.ws = self.egg.working_set([__name__])
#self.requirements, self.ws = self.egg.working_set([__name__])
# XXX-CEDRIC ARRRRRR IT TOOK ME 3 HOURS TO FIND THAT
# self.egg.working_set([__name__])
# DOES NOT WORK : __name__ IS "slapos.recipe.mysql" BUT THIS EGG
# DOES NOT EXIST SO BUILDOUT FAILS MISERABLY WHILE FINDING A DISTRIBUTION
# "slapos.recipe.mysql". SLAPOS.COOKBOOK EXISTS. UGLY WORKAROUND.
self.requirements, self.ws = self.egg.working_set(['slapos.cookbook'])
# self.cron_d is a directory, where cron jobs can be registered
self.cron_d = self.installCrond()
self.logrotate_d, self.logrotate_backup = self.installLogrotate()
......
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