[Dirvish] [PATCH] Making --link-dest relative

Robert Siemer Robert.Siemer-dirvish at backsla.sh
Sat Aug 19 09:48:39 UTC 2006


Hi!

> ...  Yours is a bit different in that you're talking mostly 
> about having the storage and management disconnected but with optimized 
> remote copies (and you'll need to make the hardlinks on the remote side 
> too.)  If you find the bit in the code that performs the 
> copy-before-sync, you might discover a way to make that command run on 
> the remote side.


I found no "copy-before-sync", only the --link-dest switch...

My attached patch is a one-liner making this very same option relative.
It's harmless and sensible but not changing much in the normal scenario.
It will be crucial for my patches to come.


Greetings,
		Robert
-------------- next part --------------
--- dirvish.orig	2006-07-27 18:25:25.000000000 +0200
+++ dirvish	2006-08-19 01:22:36.000000000 +0200
@@ -17,6 +17,8 @@
 #	Copyright 2002 and $Date: 2004/02/25 02:42:15 $
 #                         Pegasystems Technologies and J.W. Schultz 	#
 #                                                         		#
+#       Modified by <Robert.Siemer-dirvish at backsla.sh>			#
+#									#
 #	Licensed under the Open Software License version 2.0		#
 #                                                         		#
 #	This program is free software; you can redistribute it		#
@@ -427,7 +429,8 @@
 $aliastree ||= $srctree;
 
 $destree = join("/", $vault, $image, 'tree');
-$reftree = join('/', $vault, $$Options{Reference}, 'tree');
+# the $reftree is relative to the $destree
+$reftree = join("/", '../..', $$Options{Reference}, 'tree');
 $err_temp = join("/", $vault, $image, 'rsync_error.tmp');
 $err_file = join("/", $vault, $image, 'rsync_error');
 $log_file = join("/", $vault, $image, 'log');


More information about the Dirvish mailing list