Commit 0089b24a authored by Łukasz Nowak's avatar Łukasz Nowak

Provide backward compatiblity for old style method.

Thanks to partially reverting "Use only externally provided buildout."
(commit 2a0bbcc9) it is possible to use
slapgrid with provided buildout binary, but no one is forced to follow this
way, as old style internal bootstraping procedure is available.

Conflicts, manually merged:

	slapos/grid/slapgrid.py
	slapos/grid/utils.py
parent 54d4ac94
......@@ -27,6 +27,7 @@
import logging
import hashlib
import os
import pkg_resources
import stat
import subprocess
import sys
......@@ -216,8 +217,8 @@ def dropPrivileges(uid, gid):
logger.info('Succesfully dropped privileges to uid=%r gid=%r' % (uid, gid))
def bootstrapBuildout(path, buildout, additional_buildout_parametr_list=None,
console=False):
def bootstrapBuildout(path, buildout=None,
additional_buildout_parametr_list=None, console=False):
if additional_buildout_parametr_list is None:
additional_buildout_parametr_list = []
logger = logging.getLogger('BuildoutManager')
......@@ -227,7 +228,13 @@ def bootstrapBuildout(path, buildout, additional_buildout_parametr_list=None,
gid = stat_info.st_gid
invocation_list = [sys.executable, '-S']
invocation_list.append(buildout)
if buildout is not None:
invocation_list.append(buildout)
else:
logger.warning('Using old style bootstrap of included bootstrap file. '
'Consider setting buildout binary location.')
invocation_list.append(pkg_resources.resource_filename(__name__,
'zc.buildout-bootstap.py'))
invocation_list.extend(additional_buildout_parametr_list)
invocation_list.append('bootstrap')
try:
......
This diff is collapsed.
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