[Pkg-openldap-devel] r684 - openldap/trunk-2.3/debian

Torsten Landschoff torsten at debian.org
Sun Jul 16 20:41:38 UTC 2006


Hi Matthijs, 

I checked all the diffs which went over this list of your work and I
have to say I am impressed! Great work, glad that it was you who took 
over ;-))

I did not upload the current package though because of this change:

On Sat, Jul 15, 2006 at 06:12:46PM +0000, Matthijs Mohlmann wrote:
 
> Modified: openldap/trunk-2.3/debian/slapd.scripts-common
> ===================================================================
> --- openldap/trunk-2.3/debian/slapd.scripts-common	2006-07-15 18:11:28 UTC (rev 683)
> +++ openldap/trunk-2.3/debian/slapd.scripts-common	2006-07-15 18:12:45 UTC (rev 684)
> @@ -563,7 +563,7 @@
>  		backupdir=`compute_backup_path "$databasedir" "$suffix"`
>  		echo -n "  - directory $suffix... " >&2
>  		mkdir -p "$backupdir"
> -		find "$databasedir" -depth -exec mv {} "$backupdir" \;
> +		find "$databasedir"/* -depth -exec mv {} "$backupdir" \;
>  		echo done. >&2
>  	else
>  		cat >&2 <<EOF
 
Using find that way has a number of problems. The first is that it is 
not better (what filename matching in concerned) than the original 
mv command (hidden files are still not matched). What's worse is that it
will not work on directory hierarchies because files in subdirs are
moved to $backupdir, not to $backupdir/$subdir:

torsten at pulsar:~/demo$ ls -Ra ldap
ldap:
.  ..  .hidden  db1  db2

ldap/db1:
.  ..  id2entry.bdb  objectClass.bdb

ldap/db2:
.  ..  id2entry.bdb  objectClass.bdb
torsten at pulsar:~/demo$ find ldap/* -depth -exec mv '{}' backup \;
torsten at pulsar:~/demo$ ls -Ra ldap
ldap:
.  ..  .hidden
torsten at pulsar:~/demo$ ls -Ra backup
backup:
.  ..  db1  db2  id2entry.bdb  objectClass.bdb

backup/db1:
.  ..

backup/db2:
.  ..


AFAIK the suggestion in the bug report would work indeed:

	find "$databasedir" -mindepth 1 -maxdepth 1 	\
		-exec mv {} "$backupdir" \;

I just committed that change to svn but would like a second opinion 
about that (and another rebuild) before I upload the result ;)

Greetings

	Torsten
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-openldap-devel/attachments/20060716/78f8e660/attachment.pgp


More information about the Pkg-openldap-devel mailing list