diff options
Diffstat (limited to 'databases/py-barman/patches/patch-barman_backup.py')
-rw-r--r-- | databases/py-barman/patches/patch-barman_backup.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/databases/py-barman/patches/patch-barman_backup.py b/databases/py-barman/patches/patch-barman_backup.py index 82c38bcb600..d6cf1f26196 100644 --- a/databases/py-barman/patches/patch-barman_backup.py +++ b/databases/py-barman/patches/patch-barman_backup.py @@ -1,23 +1,23 @@ -$NetBSD: patch-barman_backup.py,v 1.1 2014/11/04 12:56:14 fhajny Exp $ +$NetBSD: patch-barman_backup.py,v 1.2 2015/04/07 09:42:55 fhajny Exp $ Make portable for non-glibc platforms too. ---- barman/backup.py.orig 2014-08-14 16:10:43.000000000 +0000 +--- barman/backup.py.orig 2015-01-23 13:23:54.000000000 +0000 +++ barman/backup.py -@@ -956,7 +956,7 @@ class BackupManager(object): - backup_size = 0 +@@ -1043,7 +1043,7 @@ class BackupManager(object): + deduplicated_size = 0 for dirpath, _, filenames in os.walk(backup_dest): # execute fsync() on the containing directory - dir_fd = os.open(dirpath, os.O_DIRECTORY) + dir_fd = os.open(dirpath, os.O_RDONLY) - os.fsync(dir_fd) - os.close(dir_fd) - # execute fsync() on all the contained files -@@ -1166,7 +1166,7 @@ class BackupManager(object): - shutil.move(filename, destfile) + try: + os.fsync(dir_fd) + except OSError, e: +@@ -1302,7 +1302,7 @@ class BackupManager(object): + shutil.move(srcfile, destfile) # execute fsync() on the archived WAL containing directory -- dir_fd = os.open(os.path.dirname(destfile), os.O_DIRECTORY) -+ dir_fd = os.open(os.path.dirname(destfile), os.O_RDONLY) - os.fsync(dir_fd) - os.close(dir_fd) - # execute fsync() on the archived WAL file +- dir_fd = os.open(destdir, os.O_DIRECTORY) ++ dir_fd = os.open(destdir, os.O_RDONLY) + try: + os.fsync(dir_fd) + except OSError, e: |