[Pkg-openldap-devel] r1313 - openldap/trunk/debian

matthijs at alioth.debian.org matthijs at alioth.debian.org
Mon Sep 6 21:15:35 UTC 2010


tags 594712 pending
thanks

Author: matthijs
Date: 2010-09-06 21:15:33 +0000 (Mon, 06 Sep 2010)
New Revision: 1313

Modified:
   openldap/trunk/debian/changelog
   openldap/trunk/debian/slapd.scripts-common
Log:
 * Remove upgrade_supported_from_backend, use patch from Peter Marschall to
   automatically detect these backends.


Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog	2010-09-06 18:59:21 UTC (rev 1312)
+++ openldap/trunk/debian/changelog	2010-09-06 21:15:33 UTC (rev 1313)
@@ -1,5 +1,6 @@
 openldap (2.4.23-5) UNRELEASED; urgency=high
 
+  [ Steve Langasek ]
   * High-urgency upload for RC bugfix.
   * debian/slapd.scripts-common: fix gratuitous (and wrong) use of grep in
     get_suffix(), which causes us to incorrectly parse any slapd.conf that
@@ -8,8 +9,13 @@
     SLAPD_PIDFILE is non-empty in /etc/default/slapd.  Thanks to Peter
     Marschall <peter at adpm.de> for the patch.  Closes: #593880.
 
- -- Steve Langasek <vorlon at debian.org>  Sun, 05 Sep 2010 16:08:53 -0700
+  [ Matthijs Mohlmann ]
+  * Remove upgrade_supported_from_backend, implemented patch from
+    Peter Marschall <peter at adpm.de> to automatically detect if an upgrade is
+    supported. (Closes: #594712)
 
+ -- Matthijs Mohlmann <matthijs at cacholong.nl>  Mon, 06 Sep 2010 23:09:42 +0200
+
 openldap (2.4.23-4) unstable; urgency=low
 
   [ Steve Langasek ]

Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common	2010-09-06 18:59:21 UTC (rev 1312)
+++ openldap/trunk/debian/slapd.scripts-common	2010-09-06 21:15:33 UTC (rev 1313)
@@ -158,24 +158,27 @@
 	dir=`database_dumping_destdir`
 	echo >&2 "  Dumping to $dir: "
 	for suffix in `get_suffix`; do
-		file="$dir/$suffix.ldif"
-		echo -n "  - directory $suffix... " >&2
-		# Need to support slapd.d migration from preinst
-		if [ -f "${SLAPD_CONF}" ]; then
-			slapcat_opts="-f ${SLAPD_CONF}"
-		else
-			slapcat_opts="-F ${SLAPD_CONF}"
+		dbdir=`get_directory $suffix`
+		if [ -n "$dbdir" ] && [ -d "$dbdir" ]; then
+			file="$dir/$suffix.ldif"
+			echo -n "  - directory $suffix... " >&2
+			# Need to support slapd.d migration from preinst
+			if [ -f "${SLAPD_CONF}" ]; then
+				slapcat_opts="-f ${SLAPD_CONF}"
+			else
+				slapcat_opts="-F ${SLAPD_CONF}"
+			fi
+			slapcat ${slapcat_opts} -b "$suffix" > "$file" || failed=1
+			if [ "$failed" ]; then
+				rm -f "$file"
+				echo "failed." >&2
+				db_subst slapd/upgrade_slapcat_failure location "$dir"
+				db_input critical slapd/upgrade_slapcat_failure || true
+				db_go || true
+				exit 1
+			fi
+			echo "done." >&2
 		fi
-		slapcat ${slapcat_opts} -b "$suffix" > "$file" || failed=1
-		if [ "$failed" ]; then
-			rm -f "$file"
-			echo "failed." >&2
-			db_subst slapd/upgrade_slapcat_failure location "$dir"
-			db_input critical slapd/upgrade_slapcat_failure || true
-			db_go || true
-			exit 1
-		fi
-		echo "done." >&2
 	done
 }
 
@@ -681,16 +684,7 @@
 		return 1
 	fi
 } # }}}
-upgrade_supported_from_backend() {					# {{{
-# Check if upgrading a database in the named backend is supported by
-# our scripts.
-# Usage: if upgrade_supported_from_backend "backend"; then ... fi
 
-	case "$1" in bdb|hdb) return 0; esac
-	return 1
-}
-
-# }}}
 is_initial_configuration() {						# {{{
 # Check if this is the initial configuration and not an upgrade of an 
 # existing configuration




More information about the Pkg-openldap-devel mailing list