|
@@ -44,10 +44,12 @@ import os
|
|
|
# installed on the system
|
|
|
if "B10_FROM_SOURCE" in os.environ:
|
|
|
SPECFILE_LOCATION = os.environ["B10_FROM_SOURCE"] + "/src/bin/bind10/bob.spec"
|
|
|
+ ADD_LIBEXEC_AND_LD_PATH = False
|
|
|
else:
|
|
|
PREFIX = "@prefix@"
|
|
|
DATAROOTDIR = "@datarootdir@"
|
|
|
SPECFILE_LOCATION = "@datadir@/@PACKAGE@/bob.spec".replace("${datarootdir}", DATAROOTDIR).replace("${prefix}", PREFIX)
|
|
|
+ ADD_LIBEXEC_AND_LD_PATH = True
|
|
|
|
|
|
import subprocess
|
|
|
import signal
|
|
@@ -187,7 +189,7 @@ class ProcessInfo:
|
|
|
# on construction (self.env).
|
|
|
spawn_env = copy.deepcopy(os.environ)
|
|
|
spawn_env.update(self.env)
|
|
|
- if 'B10_FROM_SOURCE' not in os.environ:
|
|
|
+ if ADD_LIBEXEC_AND_LD_PATH:
|
|
|
spawn_env['PATH'] = "@@LIBEXECDIR@@:" + spawn_env['PATH']
|
|
|
self.process = subprocess.Popen(self.args,
|
|
|
stdin=subprocess.PIPE,
|
|
@@ -357,7 +359,7 @@ class BoB:
|
|
|
def start_creator(self):
|
|
|
self.curproc = 'b10-sockcreator'
|
|
|
creator_path = os.environ['PATH']
|
|
|
- if 'B10_FROM_SOURCE' not in os.environ:
|
|
|
+ if ADD_LIBEXEC_AND_LD_PATH:
|
|
|
creator_path = "@@LIBEXECDIR@@:" + creator_path
|
|
|
self.sockcreator = isc.bind10.sockcreator.Creator(creator_path)
|
|
|
|
|
@@ -590,7 +592,7 @@ class BoB:
|
|
|
# a cleaner solution, but for a short term workaround we specify the
|
|
|
# path here, unconditionally, and without even bothering which
|
|
|
# environment variable should be used.
|
|
|
- if not "B10_FROM_SOURCE" in os.environ:
|
|
|
+ if ADD_LIBEXEC_AND_LD_PATH:
|
|
|
cur_path = os.getenv('DYLD_LIBRARY_PATH')
|
|
|
cur_path = '' if cur_path is None else ':' + cur_path
|
|
|
c_channel_env['DYLD_LIBRARY_PATH'] = "@@LIBDIR@@" + cur_path
|