rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Debian's own patches


From: Blair Zajac
Subject: Re: [rdiff-backup-users] Debian's own patches
Date: Tue, 25 Oct 2005 01:18:35 -0700
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051013)

Ben Escoto wrote:
Blair Zajac <address@hidden>
wrote the following on Mon, 24 Oct 2005 22:29:13 -0700

Debian distributes rdiff-backup containing this patch:

http://lists.gnu.org/archive/html/rdiff-backup-users/2004-06/msg00083.html

It doesn't apply cleanly to 1.1.0, so I'm wondering if it is required any more, and if it is, could it be merged into 1.1.1?


Oops, did I forget to include that all this time?  I'm getting a 404
on the actual patch from that page though.

OK.  I'm attaching the patch here.

Speaking about debian, it also contains the following two patches, which I've attached. Could these also be merged into the next release?


Thanks, I merged both; they will be in 1.0.3/1.1.1.

Thanks!

Regards,
Blair

--
Blair Zajac, Ph.D.
<address@hidden>
Subversion and Orca training and consulting
http://www.orcaware.com/svn/
#!/bin/sh -e
## rdiff-backup-hardlinks.dpatch by David Vasilevsky <address@hidden>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fixes hardlink issues
## DP: 
http://lists.gnu.org/archive/html/rdiff-backup-users/2004-06/msg00083.html

if [ $# -lt 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
       -patch) patch $patch_opts -p0 < $0;;
       -unpatch) patch $patch_opts -p0 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as 
argument"
                exit 1;;
esac

exit 0

@DPATCH@
--- rdiff_backup/Globals.py     2005-09-11 03:38:01.000000000 +0000
+++ rdiff_backup/Globals.py     2005-09-29 15:08:35.661693448 +0000
@@ -158,6 +158,10 @@
 # hardlink information regardless.
 preserve_hardlinks = 1
 
+# If true, then never enable preserve_hardlinks, regardless of whether
+# a filesystem support hard-links.
+no_hard_links = 0
+
 # If this is false, then rdiff-backup will not compress any
 # increments.  Default is to compress based on regexp below.
 compression = 1
--- rdiff_backup/Main.py        2005-09-11 03:38:01.000000000 +0000
+++ rdiff_backup/Main.py        2005-09-29 15:14:47.793120872 +0000
@@ -151,6 +151,7 @@
                elif opt == "--no-eas": Globals.set("eas_active", 0)
                elif opt == "--no-file-statistics": 
Globals.set('file_statistics', 0)
                elif opt == "--no-hard-links": 
Globals.set('preserve_hardlinks', 0)
+               elif opt == "--no-hard-links": Globals.set('no_hard_links', 1)
                elif opt == "--null-separator": Globals.set("null_separator", 1)
                elif opt == "--override-chars-to-quote":
                        Globals.set('chars_to_quote', arg)
@@ -431,7 +432,8 @@
                                           "disabled on destination filesystem")
 
        if Globals.preserve_hardlinks != 0:
-               SetConnections.UpdateGlobal('preserve_hardlinks', 
dest_fsa.hardlinks)
+               SetConnections.UpdateGlobal('preserve_hardlinks', 
dest_fsa.hardlinks and
+               not Globals.no_hard_links)
        SetConnections.UpdateGlobal('fsync_directories', dest_fsa.fsync_dirs)
        SetConnections.UpdateGlobal('change_ownership', dest_fsa.ownership)
        SetConnections.UpdateGlobal('chars_to_quote', dest_fsa.chars_to_quote)
@@ -540,7 +542,8 @@
                                           "disabled on destination filesystem")
 
        if Globals.preserve_hardlinks != 0:
-               SetConnections.UpdateGlobal('preserve_hardlinks', 
target_fsa.hardlinks)
+               SetConnections.UpdateGlobal('preserve_hardlinks', 
target_fsa.hardlinks and
+               not Globals.no_hard_links)
        SetConnections.UpdateGlobal('change_ownership', target_fsa.ownership)
 
        if Globals.chars_to_quote is None: # otherwise already overridden
@@ -719,7 +722,8 @@
                                  ('carbonfile_active', 'carbonfile_write', 
'carbonfile_conn'))
 
        if Globals.preserve_hardlinks != 0:
-               SetConnections.UpdateGlobal('preserve_hardlinks', fsa.hardlinks)
+               SetConnections.UpdateGlobal('preserve_hardlinks', fsa.hardlinks 
and
+               not Globals.no_hard_links)
        SetConnections.UpdateGlobal('fsync_directories', fsa.fsync_dirs)
        SetConnections.UpdateGlobal('change_ownership', fsa.ownership)
        SetConnections.UpdateGlobal('chars_to_quote', fsa.chars_to_quote)
--- rdiff_backup/rpath.py       2005-09-11 03:38:01.000000000 +0000
+++ rdiff_backup/rpath.py       2005-09-29 15:16:02.930698224 +0000
@@ -154,9 +154,11 @@
        assert rpin.lstat() == rpout.lstat() or rpin.isspecial()
        if Globals.change_ownership: rpout.chown(*user_group.map_rpath(rpin))
        if rpin.issym(): return # symlinks don't have times or perms
-       if Globals.resource_forks_write and rpin.isreg():
+       if (Globals.resource_forks_write and rpin.isreg() and
+                       not rpin.isflaglinked()):
                rpout.write_resource_fork(rpin.get_resource_fork())
-       if Globals.carbonfile_write and rpin.isreg():
+       if (Globals.carbonfile_write and rpin.isreg() and
+                       not rpin.isflaglinked()):
                rpout.write_carbonfile(rpin.get_carbonfile())
        if Globals.eas_write: rpout.write_ea(rpin.get_ea())
        rpout.chmod(rpin.getperms())

reply via email to

[Prev in Thread] Current Thread [Next in Thread]