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
