[Pkg-openldap-devel] r1222 - openldap/trunk/debian
vorlon at alioth.debian.org
vorlon at alioth.debian.org
Sun Apr 19 21:49:04 UTC 2009
tags 522965 pending
thanks
Author: vorlon
Date: 2009-04-19 21:49:03 +0000 (Sun, 19 Apr 2009)
New Revision: 1222
Modified:
openldap/trunk/debian/changelog
openldap/trunk/debian/control
openldap/trunk/debian/slapd.scripts-common
Log:
Build-depend on libltdl-dev | libltdl3-dev (>= 1.4.3), for the package
name change. Closes: #522965.
Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog 2009-04-02 06:45:19 UTC (rev 1221)
+++ openldap/trunk/debian/changelog 2009-04-19 21:49:03 UTC (rev 1222)
@@ -8,6 +8,8 @@
what we're using. Closes: #498116.
* Set the default SLAPD_SERVICES to ldap:/// ldapi:///, instead of using
the built-in default of ldap:/// only.
+ * Build-depend on libltdl-dev | libltdl3-dev (>= 1.4.3), for the package
+ name change. Closes: #522965.
[ Updated debconf translations ]
* Spanish, thanks to Francisco Javier Cuadrado <fcocuadrado at gmail.com>.
Modified: openldap/trunk/debian/control
===================================================================
--- openldap/trunk/debian/control 2009-04-02 06:45:19 UTC (rev 1221)
+++ openldap/trunk/debian/control 2009-04-19 21:49:03 UTC (rev 1222)
@@ -10,7 +10,7 @@
Russ Allbery <rra at debian.org>
Build-Depends: debhelper (>= 6), libdb4.7-dev, libgcrypt-dev,
libgnutls-dev (>= 1.7), unixodbc-dev, libncurses5-dev, libperl-dev (>= 5.8.0),
- libsasl2-dev, libslp-dev, libltdl3-dev (>= 1.4.3),
+ libsasl2-dev, libslp-dev, libltdl-dev | libltdl3-dev (>= 1.4.3),
libwrap0-dev, perl, debconf-utils, po-debconf, quilt (>= 0.40),
autotools-dev, libtool, automake, autoconf, groff-base, time
Build-Conflicts: libbind-dev, bind-dev, libicu-dev
Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common 2009-04-02 06:45:19 UTC (rev 1221)
+++ openldap/trunk/debian/slapd.scripts-common 2009-04-19 21:49:03 UTC (rev 1222)
@@ -160,7 +160,8 @@
for db in `get_database_list`; do
suffix=`get_suffix $db`
dbdir=`get_directory $db`
- if ! is_empty_dir "$dbdir"; then
+ if ! is_empty_dir "$dbdir" &&
+ ! dir_only_contains_DB_CONFIG "$dbdir"; then
echo >&2 \
" Directory $dbdir for $suffix not empty, aborting."
exit 1
@@ -169,13 +170,16 @@
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 -n "$dbdir" "$suffix"`
- if [ -e "$backupdir"/DB_CONFIG ]; then
- cp -a "$backupdir"/DB_CONFIG "$dbdir"/
- else
- copy_example_DB_CONFIG "$dbdir"/
+ # If there is no DB_CONFIG file in the database dir, but
+ # an old DB_CONFIG file in the backup dir,
+ # restore it before running slapadd
+ if [ ! -e "$dbdir"/DB_CONFIG ]; then
+ backupdir=`compute_backup_path -n "$dbdir" "$suffix"`
+ if [ -e "$backupdir"/DB_CONFIG ]; then
+ cp -a "$backupdir"/DB_CONFIG "$dbdir"/
+ else
+ copy_example_DB_CONFIG "$dbdir"/
+ fi
fi
capture_diagnostics slapadd -q -b "$suffix" -l "$file" \
@@ -1014,7 +1018,7 @@
# Check if a path refers to an empty directory
# Usage: if is_empty_dir "$dir"; then ... fi
- output=`find "$1" -type d -maxdepth 0 -empty 2>/dev/null`
+ output=`find "$1" -maxdepth 0 -type d -empty 2>/dev/null`
if [ "$output" ]; then
return 0
else
@@ -1024,6 +1028,24 @@
# }}}
+# }}}
+dir_only_contains_DB_CONFIG() { # {{{
+# Check if a path refers to a directory
+# that is empty or contains only DB_CONFIG
+# Usage: if dir_only_contains_DB_CONFIG "$dir"; then ... fi
+
+ test -d "$1" || return 1
+
+ output=`find "$1" -mindepth 1 -maxdepth 1 2>/dev/null | grep -v /DB_CONFIG$`
+ if [ "$output" ]; then
+ return 1
+ else
+ return 0
+ fi
+}
+
+# }}}
+
# ===== Global variables ================================================ {{{
#
# At some points we need to know which version we are upgrading from if
More information about the Pkg-openldap-devel
mailing list