From 2bcd81934d900845fa178bf11d138c95715f11c9 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 28 Apr 2015 21:06:19 +0200 Subject: [PATCH] ddns: Add more upstream patches. --- lfs/ddns | 3 +- ...ddns-007-perform-lazy-database-init.patch} | 0 ...-open-database-for-search-operations.patch | 40 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) rename src/patches/ddns/{ddns-007-perform-lazy-database-init.patch => 001-ddns-007-perform-lazy-database-init.patch} (100%) create mode 100644 src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch diff --git a/lfs/ddns b/lfs/ddns index 93f6667e6..463ae28a9 100644 --- a/lfs/ddns +++ b/lfs/ddns @@ -71,7 +71,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) - cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns/ddns-007-perform-lazy-database-init.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch cd $(DIR_APP) && [ -x "configure" ] || sh ./autogen.sh cd $(DIR_APP) && ./configure \ diff --git a/src/patches/ddns/ddns-007-perform-lazy-database-init.patch b/src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch similarity index 100% rename from src/patches/ddns/ddns-007-perform-lazy-database-init.patch rename to src/patches/ddns/001-ddns-007-perform-lazy-database-init.patch diff --git a/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch b/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch new file mode 100644 index 000000000..19534f3b8 --- /dev/null +++ b/src/patches/ddns/002-ddns-007-also-open-database-for-search-operations.patch @@ -0,0 +1,40 @@ +commit f62fa5baffe2d225604460ecd03b8159b987df8f +Author: Michael Tremer +Date: Sun Apr 26 20:15:33 2015 +0200 + + database: Open database for the search operations, too + +diff --git a/src/ddns/database.py b/src/ddns/database.py +index 42c3433..70a7363 100644 +--- a/src/ddns/database.py ++++ b/src/ddns/database.py +@@ -122,6 +122,9 @@ class DDNSDatabase(object): + """ + Returns the timestamp of the last update (with the given status code). + """ ++ if self._db is None: ++ self._db = self._open_database(self.path) ++ + c = self._db.cursor() + + try: +@@ -141,6 +144,9 @@ class DDNSDatabase(object): + """ + Returns the update status of the last update. + """ ++ if self._db is None: ++ self._db = self._open_database(self.path) ++ + c = self._db.cursor() + + try: +@@ -156,6 +162,9 @@ class DDNSDatabase(object): + """ + Returns the reason string for the last failed update (if any). + """ ++ if self._db is None: ++ self._db = self._open_database(self.path) ++ + c = self._db.cursor() + + try: -- 2.39.2