Proposed enhancement: --rewrite-symlinks

This is a discussion on Proposed enhancement: --rewrite-symlinks within the Rsync forums, part of the Networking and Network Related category; The following might be a nice addition to rsync. Have an option "--rewrite-symlinks" that causes rsync to ...


Go Back   Usenet Forums > Networking and Network Related > Rsync

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-05-2005
Matt McCutchen
 
Posts: n/a
Default Proposed enhancement: --rewrite-symlinks

The following might be a nice addition to rsync. Have an option
"--rewrite-symlinks" that causes rsync to rewrite relative symlinks so
that the source and destination symlinks point to the same places.

For example, I have a symlink "/home/matt/msync" that contains the path
"../sync-machinery/msync". (Incidentally, msync is a nice two-way
synchronization script based on rsync.) I wanted to install this link
into /usr/local/bin so that other people on my machine could access the
program, so I rsync-ed it into /usr/local/bin with -l. The link path
still read "../sync-machinery/msync", so the link was broken. If I had
supplied "--rewrite-symlinks" (and rsync supported it), the path should
have been rewritten to "../../../home/matt/sync-machinery/msync".

I think a symlink should only be rewritten if it points outside the
transfer. Maybe there should be other rules based on whether the source
symlink is broken and/or whether the destination symlink would be broken
if it weren't rewritten. Obviously, there's no way to symlink to
another computer, so rewriting symlinks only makes sense for local
transfers.

Thoughts on this?
--
Matt McCutchen, ``hashproduct''
hashproduct@verizon.net -- http://mysite.verizon.net/hashproduct/

--
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0