Package: backup2l / 1.6-4

06_fix-in-renamed-backups.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Package:     backup2l
Subject:     fix verify failure in renamed backups
Author:      Joachim Wiedorn <joodebian at joonet.de>
Bug-Ubuntu:  https://bugs.launchpad.net/ubuntu/+source/backup2l/+bug/934203
Forwarded:   no
Last-Update: 2012-04-27

The md5sum check fails because the filenames in the older .check files
are not updated properly when the full backup versions are renamed. The
filenames in the .check file are prepended by ./ while the sed command
in backup2l looks for a leading space.
---

diff -urN s05/backup2l s06/backup2l
--- s05/backup2l	2012-04-27 16:15:33.880477880 +0200
+++ s06/backup2l	2012-04-27 20:45:23.736469131 +0200
@@ -441,7 +441,8 @@
                     fi
                 done
                 for CHK in $VOLNAME.$DST*.check ; do
-                    sed "s/ $VOLNAME.$SRC/ $VOLNAME.$DST/" < $CHK > $TMP.check
+                    cat $CHK | sed "s/ \.\/$VOLNAME.$SRC/ \.\/$VOLNAME.$DST/" |\
+                      sed "s/ $VOLNAME.$SRC/ $VOLNAME.$DST/" > $TMP.check
                     mv $TMP.check $CHK
                 done
             fi