[Pkg-openldap-devel] [openldap] 05/17: Knocking a TODO item off the list:

Timo Aaltonen tjaalton-guest at alioth.debian.org
Thu Oct 10 05:35:31 UTC 2013


This is an automated email from the git hooks/post-receive script.

tjaalton-guest pushed a commit to annotated tag 2.2.23-3
in repository openldap.

commit e95378e2ca0b12032abbd83646b6fa064c6e1a72
Author: Steve Langasek <vorlon at debian.org>
Date:   Sun Apr 17 07:54:28 2005 +0000

    Knocking a TODO item off the list:
    
      * Updated maintainer scripts to keep DB_CONFIG for LDAP databases over
        upgrades (closes: #265860).
---
 debian/TODO                 |    2 --
 debian/changelog            |    4 +++-
 debian/slapd.scripts-common |   15 ++++++++++++++-
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/debian/TODO b/debian/TODO
index 8d2d07f..2179357 100644
--- a/debian/TODO
+++ b/debian/TODO
@@ -1,7 +1,5 @@
 openldap2.2 (2.2.23-3) unstable; urgency=low
 
-  * Updated maintainer scripts to keep DB_CONFIG for LDAP databases over 
-    upgrades (closes: #265860).
   * debian/slapd.NEWS: Summarize the upstream changes and make clear that
     the upgrade may be problemated. Sketch the upgrade procedure.
   * debian/README.Debian: Explain what to check for if upgrading fails and
diff --git a/debian/changelog b/debian/changelog
index c2d6726..b56aad1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,8 +18,10 @@ openldap2.2 (2.2.23-3) unstable; urgency=low
     /usr/share/doc aren't penalized.  Create links for the DB_CONFIG and
     slapd.confg templates to /usr/share/doc/slapd/examples, since these
     are worthwhile examples as well.
+  * Updated maintainer scripts to keep DB_CONFIG for LDAP databases over 
+    upgrades (closes: #265860).
 
- -- Steve Langasek <vorlon at debian.org>  Sat, 16 Apr 2005 19:27:30 -0700
+ -- Steve Langasek <vorlon at debian.org>  Sun, 17 Apr 2005 00:47:52 -0700
 
 openldap2.2 (2.2.23-2) unstable; urgency=low
 
diff --git a/debian/slapd.scripts-common b/debian/slapd.scripts-common
index c5692c5..1a18c0c 100644
--- a/debian/slapd.scripts-common
+++ b/debian/slapd.scripts-common
@@ -136,7 +136,7 @@ dump_databases() {							# {{{
 
 # }}}
 load_databases() {							# {{{
-	local dir file db dbdir
+	local dir file db dbdir backupdir
 
 	dir=`database_dumping_destdir`
 	echo >&2 "  Loading from $dir: "
@@ -152,11 +152,24 @@ load_databases() {							# {{{
 
 		file="$dir/$suffix.ldif"
 		echo -n "  - directory $suffix... " >&2
+
+		# If there is an old DB_CONFIG file, restore it before
+		# running slapadd
+		backupdir=`compute_backup_path "$dbdir" "$suffix"`
+		if [ -e "$backupdir"/DB_CONFIG ]; then
+			cp -a "$backupdir"/DB_CONFIG "$dbdir"/
+		fi
+
 		capture_diagnostics slapadd -q -b "$suffix" -l "$file" \
 			|| failed=1
 		if [ "$failed" ] && \
 			  automatic_ldif_fixing_wanted_for "$file"; then
 			rm -f "$dbdir"/*
+			# If there is an old DB_CONFIG file, restore it 
+			# before running slapadd
+			if [ -e "$backupdir"/DB_CONFIG ]; then
+				cp -a "$backupdir"/DB_CONFIG "$dbdir"/
+			fi
 			failed=
 			echo -n "fixing" >&2
 			# This only works because we used capture_diag

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openldap/openldap.git



More information about the Pkg-openldap-devel mailing list