Browse Source

renamved B10_SPECFILE_PATH to B10_FROM_SOURCE
to tell bind10 and all its subprocesses that we are running from source and where that source lives


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@674 e5f2f494-b856-4b98-b285-d166d9295462

Jelte Jansen 15 years ago
parent
commit
e5ce25b741
2 changed files with 6 additions and 4 deletions
  1. 4 2
      src/bin/bind10/bind10.py.in
  2. 2 2
      src/bin/bind10/run_bind10.sh.in

+ 4 - 2
src/bin/bind10/bind10.py.in

@@ -27,8 +27,8 @@ __main__.
 # If B10_SPECFILE_PATH is set in the environment, we use the specification
 # file there, instead of the installed one (for instance when we run
 # from the source tree)
-if "B10_SPECFILE_PATH" in os.environ:
-    SPECFILE_LOCATION = os.environ["B10_SPECFILE_PATH"] + "/bob.spec"
+if "B10_FROM_SOURCE" in os.environ:
+    SPECFILE_LOCATION = os.environ["B10_FROM_SOURCE"] + "/src/bin/bind10/bob.spec"
 else:
     PREFIX = "@prefix@"
     DATAROOTDIR = "@datarootdir@"
@@ -69,6 +69,8 @@ class ProcessInfo:
             spawn_stdout = None
         spawn_env = self.env
         spawn_env['PATH'] = os.environ['PATH']
+        if 'B10_FROM_SOURCE' in os.environ:
+            spawn_env['B10_FROM_SOURCE'] = os.environ['B10_FROM_SOURCE']
         if 'PYTHON_EXEC' in os.environ:
             spawn_env['PYTHON_EXEC'] = os.environ['PYTHON_EXEC']
         self.process = subprocess.Popen(self.args,

+ 2 - 2
src/bin/bind10/run_bind10.sh.in

@@ -11,8 +11,8 @@ export PATH
 PYTHONPATH=@abs_top_srcdir@/src/lib/cc/python:@abs_top_srcdir@/src/lib/config/python
 export PYTHONPATH
 
-B10_SPECFILE_PATH=@abs_srcdir@
-export B10_SPECFILE_PATH
+B10_FROM_SOURCE=@abs_top_srcdir@
+export B10_FROM_SOURCE
 
 cd ${BIND10_PATH}
 exec ${PYTHON_EXEC} -O bind10 $*