Try it without "--delete-after".  I'm pretty sure that --delete-after also 
affects --force, so I think it's trying to write to the directory pointed 
to by the symlink, which doesn't exist.  I could be wrong, but that looks 
like the most likely interaction.

Tim Conway
[EMAIL PROTECTED]
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn, 
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970), 
".\n" '
"There are some who call me.... Tim?"




Phil Howard <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
03/07/2002 11:35 PM

 
        To:     [EMAIL PROTECTED]
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        delete fails to delete everything it should like dangling 
symlinks
        Classification: 



I think someone posted this before, but I can't find it in the archives.

I am using rsync to pull down source files to be compiled.  The delete
options are used to clear out any old files left over from previous.
Normally this works.  I've run into one case where it persistently fails.

Within the directory created during compiling is a symlink to another
directory, also created during compiling (well, literally, during tar
extraction done by the script that does the compiling).  When rsync is
run to re-syncronize, which should delete all created files (including
all those extracted from the tar file), the directory that is the target
of the symlink apparently is deleted first.  Then when the symlink is
encountered, I get an error saying that readlink gets No such file or
directory.  This doesn't make sense since readlink should work on a
dangling link.

Here's a paste of manually doing the rsync within the same host
(warning, the first line is 318 characters long):

=============================================================================
root@pollux:/home/root/src 152> rsync --checksum --copy-unsafe-links 
--compress '--exclude=*~' '--exclude=#*#' --force --group --links --owner 
--partial --perms --progress --recursive --timeout=150 --times --verbose 
--delete --delete-after --delete-excluded --ignore-errors --force 
/home/root/src-pub/ /home/root/src/
rsync: building file list...
rsync: 809 files to consider.
readlink openssl-0.9.6b/work/openssl-0.9.6b/crypto/des/asm/perlasm: No 
such file or directory
readlink openssl-0.9.6c/tmp/openssl-0.9.6c/crypto/des/asm/perlasm: No such 
file or directory
wrote 34720 bytes  read 20 bytes  4087.06 bytes/sec
total size is 85523954  speedup is 2461.83
rsync error: partial transfer (code 23) at main.c(576)
root@pollux:/home/root/src 153> readlink 
openssl-0.9.6c/tmp/openssl-0.9.6c/crypto/des/asm/perlasm
../../perlasm
root@pollux:/home/root/src 154> rsync --version
rsync  version 2.5.2  protocol version 26
Copyright (C) 1996-2002 by Andrew Tridgell and others
<http://rsync.samba.org/>
Capabilities: 64-bit files, socketpairs, hard links, symlinks, batchfiles, 
IPv6,
              32-bit system inums, 64-bit internal inums
root@pollux:/home/root/src 155>
=============================================================================

As you can see I'm using a number of options that should, according
to the man page, make sure things get deleted.  But this is not
happening.

I assume that "partial transfer (code 23)" error message is because
it did recognize that it failed to completely get things in sync.

BTW, after manually deleting the 2 symlinks, it works fine:

=============================================================================
root@pollux:/home/root/src 155> rm -f 
openssl-0.9.6b/work/openssl-0.9.6b/crypto/des/asm/perlasm
root@pollux:/home/root/src 156> rm -f 
openssl-0.9.6c/tmp/openssl-0.9.6c/crypto/des/asm/perlasm
root@pollux:/home/root/src 157> rsync --checksum --copy-unsafe-links 
--compress '--exclude=*~' '--exclude=#*#' --force --group --links --owner 
--partial --perms --progress --recursive --timeout=150 --times --verbose 
--delete --delete-after
--delete-excluded --ignore-errors --force /home/root/src-pub/ 
/home/root/src/
rsync: building file list...
rsync: 809 files to consider.
deleting directory openssl-0.9.6c/tmp/openssl-0.9.6c/crypto/des/asm
deleting directory openssl-0.9.6c/tmp/openssl-0.9.6c/crypto/des
deleting directory openssl-0.9.6c/tmp/openssl-0.9.6c/crypto
deleting directory openssl-0.9.6c/tmp/openssl-0.9.6c
deleting directory openssl-0.9.6c/tmp
deleting directory openssl-0.9.6b/work/openssl-0.9.6b/crypto/des/asm
deleting directory openssl-0.9.6b/work/openssl-0.9.6b/crypto/des
deleting directory openssl-0.9.6b/work/openssl-0.9.6b/crypto
deleting directory openssl-0.9.6b/work/openssl-0.9.6b
deleting directory openssl-0.9.6b/work
wrote 34720 bytes  read 20 bytes  4087.06 bytes/sec
total size is 85523954  speedup is 2461.83
root@pollux:/home/root/src 158>
=============================================================================

-- 
-----------------------------------------------------------------
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
-----------------------------------------------------------------

-- 
To unsubscribe or change options: 
http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html




-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to