BIND 10 trac1628, updated. bf694f93b3d1f88ff17feee783f207645a545d4e [1628] Update path where ddns.spec is read when running from installed copy

BIND 10 source code commits bind10-changes at lists.isc.org
Wed May 16 05:45:06 UTC 2012


The branch, trac1628 has been updated
       via  bf694f93b3d1f88ff17feee783f207645a545d4e (commit)
       via  8d39f05a758c8c10480872a7b757c97ff09909af (commit)
      from  b1e8bf0d957426abf9aacaa992e966ef0c6aac81 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bf694f93b3d1f88ff17feee783f207645a545d4e
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed May 16 10:53:30 2012 +0530

    [1628] Update path where ddns.spec is read when running from installed copy

commit 8d39f05a758c8c10480872a7b757c97ff09909af
Author: Mukund Sivaraman <muks at isc.org>
Date:   Wed May 16 10:42:25 2012 +0530

    [master] Update .gitignore

-----------------------------------------------------------------------

Summary of changes:
 src/bin/ddns/ddns.py.in                         |   18 +++++++++++++-----
 tests/lettuce/configurations/bindctl/.gitignore |    1 +
 2 files changed, 14 insertions(+), 5 deletions(-)
 create mode 100644 tests/lettuce/configurations/bindctl/.gitignore

-----------------------------------------------------------------------
diff --git a/src/bin/ddns/ddns.py.in b/src/bin/ddns/ddns.py.in
index 22e4e9c..de69100 100755
--- a/src/bin/ddns/ddns.py.in
+++ b/src/bin/ddns/ddns.py.in
@@ -39,18 +39,26 @@ isc.log.init("b10-ddns")
 logger = isc.log.Logger("ddns")
 TRACE_BASIC = logger.DBGLVL_TRACE_BASIC
 
-DATA_PATH = bind10_config.DATA_PATH
-SOCKET_FILE = DATA_PATH + '/ddns_socket'
+# If B10_FROM_SOURCE is set in the environment, we use data files
+# from a directory relative to that, otherwise we use the ones
+# installed on the system
 if "B10_FROM_SOURCE" in os.environ:
-    DATA_PATH = os.environ['B10_FROM_SOURCE'] + "/src/bin/ddns"
+    SPECFILE_LOCATION = os.environ["B10_FROM_SOURCE"] + os.sep + \
+        "src" + os.sep + "bin" + os.sep + "ddns" + os.sep + "ddns.spec"
+else:
+    PREFIX = "@prefix@"
+    DATAROOTDIR = "@datarootdir@"
+    SPECFILE_LOCATION = "@datadir@" + os.sep + "@PACKAGE@" + os.sep + "ddns.spec"
+    SPECFILE_LOCATION = SPECFILE_LOCATION.replace("${datarootdir}", DATAROOTDIR)\
+        .replace("${prefix}", PREFIX)
+
+SOCKET_FILE = bind10_config.DATA_PATH + '/ddns_socket'
 if "B10_FROM_BUILD" in os.environ:
     if "B10_FROM_SOURCE_LOCALSTATEDIR" in os.environ:
         SOCKET_FILE = os.environ["B10_FROM_SOURCE_LOCALSTATEDIR"] + \
             "/ddns_socket"
     else:
         SOCKET_FILE = os.environ["B10_FROM_BUILD"] + "/ddns_socket"
-SPECFILE_LOCATION = DATA_PATH + "/ddns.spec"
-
 
 isc.util.process.rename()
 
diff --git a/tests/lettuce/configurations/bindctl/.gitignore b/tests/lettuce/configurations/bindctl/.gitignore
new file mode 100644
index 0000000..e14ae76
--- /dev/null
+++ b/tests/lettuce/configurations/bindctl/.gitignore
@@ -0,0 +1 @@
+/bindctl.config



More information about the bind10-changes mailing list