duplicity-talk
[Top][All Lists]
Advanced

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

Re: [Duplicity-talk] Fixes for device file handling


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] Fixes for device file handling
Date: Wed, 02 Sep 2009 05:45:17 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Kaspar Brand wrote:
> The attached patch fixes two issues when handling device files:
> 
> 1) makes sure that minor numbers > 255 are properly handled
>    (path.py)
> 
> 2) makes sure that major/minor numbers are correctly parsed
>    when processing an existing archive (tarfile.py)
> 
> Without these fixes, incremental backups don't work properly, in my
> case - they are added to every time, because duplicity fails to match
> them with the corresponding records in previous backups.
> 
> More specifically: on my platform, I have devices with minor numbers >
> 255, so "self.stat.st_rdev & 0xff" doesn't fit. As duplicity is
> requiring Python 2.3 in any case, it seems safe to use os.major/os.minor
> by now.
> 
> The second issue starts occuring with Python 2.5, actually: int() will
> no longer convert strings which include a null byte, so
> tarinfo.devmajor/tarinfo.devminor always end up with being set to 0 when
> an existing archive is processed (_buftoinfo). Shortening the buffer by
> one byte (i.e., leaving out the trailing null byte) does the trick.
> 
> The diff is against trunk, but applies cleanly to stable, too.

Thanks for the patches!

...Ken


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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