[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[rdiff-backup-users] [PATCH] Fix for bug in regressing
From: |
Josh Nisly |
Subject: |
[rdiff-backup-users] [PATCH] Fix for bug in regressing |
Date: |
Fri, 09 May 2008 07:37:59 -0500 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
While doing some unrelated testing, I ran across a bug in regressing a
failed backup. The regress fails with:
OSError: [Errno 2] No such file or directory:
'.../run_backups_test/rdiff-backup-data/mirror_metadata.2008-05-08T18:24:21-05:00.snapshot.gz'
It seems that other users have encountered this as well:
http://lists.gnu.org/archive/html/rdiff-backup-users/2007-01/msg00011.html
http://lists.gnu.org/archive/html/rdiff-backup-users/2008-01/msg00033.html
And I believe this bug also started off Sam's problems here:
http://lists.gnu.org/archive/html/rdiff-backup-users/2008-02/msg00018.html
The problem is occurs when we are trying to regress the mirror_metadata
file, and the file is compressed. The code in recreate_meta() in
regress.py creates a temporary filename, tells the metadata writer to
create the file, then moves it to the correct location. The problem is
that the metadata writer may actually create the filename with a .gz
extension, so when recreate_meta() tries to rename the file, it doesn't
exist. (At that point, since the source doesn't exist, it tries to
delete the destination file, which is why the error message references
the filename it does.)
I believe the correct solution is to pass a callback into the metadata
writer that is told what the actual filename written is. Attached is a
patch to do this.
The fix is pretty simple and obvious, but I do have a (~15MB gzipped)
repo that demonstrates the problem. I'd prefer not to post it publicly,
but if a committer wants it to confirm the bug and fix, I can make it
available to them.
Thanks,
JoshN
rdiff-backup-patch.tar
Description: Unix tar archive
- [rdiff-backup-users] [PATCH] Fix for bug in regressing,
Josh Nisly <=