On Mon, 20 Aug 2012 21:19:08 -0700, Ian Zimmerman writes:
>Sorry, I don't get that.  From where I stand, the dead simple (and
>correct) solution is to _never_ follow any symlinks, 

on further reflection i agree. i was more thinking of the scenario
"have path, must check if on same fs", ignoring how that path was
reached.

> just record them (i.e. their existence and target) in the archive 

and duplicity does that when it's backing up stuff.

the bug is that it doesn't do that in the exclude function, and
i think i've found the root cause. (it's a really messy object hierarchy...)

could you try the attached patch? in my test environment it takes
care of the problem.
(removing /usr/lib/python*/dist-packages/duplicity/selection.pyc 
may be a good idea to ensure python doesn't use the precompiled old 
module.)

regards
az

--- /usr/share/pyshared/duplicity/selection.py.orig	2012-08-22 12:10:26.000000000 +1000
+++ /usr/share/pyshared/duplicity/selection.py	2012-08-22 12:23:43.000000000 +1000
@@ -506,6 +506,11 @@
         assert include == 0 or include == 1
 
         def exclude_sel_func(path):
+            # do not follow symbolic links when checking for file existence!
+            # path.append creates a new path object, which in turn uses setdata
+            # which in turn follows symbolic links...
+            if path.issym():
+                return None
             if path.append(filename).exists():
                 return 0
             else:
-- 
Alexander Zangerl + GnuPG Keys 0x42BD645D or 0x5B586291 + http://snafu.priv.at/
You're never alone with a news spool.

Attachment: signature.asc
Description: Digital Signature

Reply via email to