Unfortunately, I don't have a broadband connection right now, so this bug
report (and fix) is on a plain 8.2. However, as far as I can see, the
draksync in cooker is the same as in 8.2, draksync-8.0.17mdk.
The problem of synchronizing over ssh has been described before:
http://www.mail-archive.com/cooker@linux-mandrake.com/msg60033.html 

> Regardless of the fact that the local file is more
> recent (by days) than the remote file, the remote
> file
> always replaces the local file.

Here is where I believe the bug is:
 grep rsync /usr/lib/DrakSync/commands/none_is_newer.exp

# Firs, we have to ask rsync how much to transfer
spawn rsync -rlpgtz --progress --stats --dry-run "$src" "$dst"
spawn rsync -rlpgtz --progress --stats --dry-run "$dst" "$src"
spawn rsync -rlpgtz --progress --stats "$src" "$dst"
spawn rsync -rlpgtz --progress --stats "$dst" "$src"

and you notice that the -rlpgtz options to rsync mean:
recursive, recreate symlinks on the destination, preserve permissions,
preserve groups and use compression during transmission. 
However, conspicuously missing is: 
       -u, --update
              This  forces  rsync to skip any files for which the
              destination file already  exists  and  has  a  date
              later than the source file.
Adding -u to all invokations of rsync in none_is_newer.exp not only seems
like the only logical thing to do, it also solves the problem for me. 

I hope that this bug fix will both make it into cooker as well as into
bug fixes for 8.2 -- this bug makes draksync almost completely
unusable.

Best,

Narfi.


Reply via email to