From: cbarratt Date: Mon, 4 Dec 2006 05:36:02 +0000 (+0000) Subject: Minor changes to lib/BackupPC/Xfer/RsyncDigest.pm and bin/BackupPC_nightly X-Git-Tag: v3_0_0beta3 X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=commitdiff_plain;h=refs%2Ftags%2Fv3_0_0beta3 Minor changes to lib/BackupPC/Xfer/RsyncDigest.pm and bin/BackupPC_nightly --- diff --git a/ChangeLog b/ChangeLog index 366ba11..09c29ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,11 +30,14 @@ to 0xd7 to allow correct protocol_version >= 27 md4 checksums to be written. Old cached checksum files have a first byte 0xd6 and are now considered to be uncached. They will be automatically updated - as needed. + as needed. This avoids the cached checksum warnings in beta2. * BackupPC_tarPCCopy now handles all file types correctly. Reported by George Avrunin. +* Fixed BackupPC_nightly to finish pending deletes before renaming + pool chains. + * Fixes for rsync restore where hardlink is to file outside of the top-level restore directory. Reported by George Avrunin, who helped with debugging. diff --git a/bin/BackupPC_nightly b/bin/BackupPC_nightly index 366345f..ff26182 100755 --- a/bin/BackupPC_nightly +++ b/bin/BackupPC_nightly @@ -55,7 +55,7 @@ # #======================================================================== # -# Version 3.0.0beta2, released 11 Nov 2006. +# Version 3.0.0beta3, released 3 Dec 2006. # # See http://backuppc.sourceforge.net. # @@ -170,6 +170,15 @@ for my $pool ( qw(pool cpool) ) { $dirCnt++ if ( ($i % 16) == 0 && -d "$TopDir/$pool/$hexChars[int($i / 16)]" ); + # + # We need to process all pending deletes before we do the + # renames + # + if ( @PendingDelete ) { + sleep(1); + processPendingDeletes(1); + } + # # Now make sure that files with repeated checksums are still # sequentially numbered @@ -203,7 +212,7 @@ for my $pool ( qw(pool cpool) ) { } } -sleep(10); +sleep(1); processPendingDeletes(1); ########################################################################### diff --git a/lib/BackupPC/Xfer/RsyncDigest.pm b/lib/BackupPC/Xfer/RsyncDigest.pm index 2790346..7a589a4 100644 --- a/lib/BackupPC/Xfer/RsyncDigest.pm +++ b/lib/BackupPC/Xfer/RsyncDigest.pm @@ -29,7 +29,7 @@ # #======================================================================== # -# Version 3.0.0beta2, released 11 Nov 2006. +# Version 3.0.0beta3, released 3 Dec 2006. # # See http://backuppc.sourceforge.net. # @@ -269,7 +269,7 @@ sub digestStart return -3 if ( read($fh, $data, 1) != 1 ); my $ret; - if ( $data eq chr(0x78) && $doCache > 0 + if ( ($data eq chr(0x78) || $data eq chr(0xd6)) && $doCache > 0 && $checksumSeed == RSYNC_CSUMSEED_CACHE ) { # # RSYNC_CSUMSEED_CACHE (32761) is the magic number that @@ -287,7 +287,7 @@ sub digestStart $blockSize || BackupPC::Xfer::RsyncDigest->blockSize( $fileSize, $defBlkSize), - $checksumSeed, $dg->{protocol_version}); + $checksumSeed, 0, $dg->{protocol_version}); if ( $ret < 0 ) { &$Log("digestAdd($fileName) failed ($ret)"); } @@ -445,7 +445,7 @@ sub logHandler # sub logHandlerSet { - my($sub) = @_; + my($dg, $sub) = @_; $Log = $sub; } diff --git a/makeDist b/makeDist index d2bc2e6..b8f4361 100755 --- a/makeDist +++ b/makeDist @@ -53,8 +53,8 @@ die("BackupPC::Lib->new failed\n") umask(0022); -my $Version = "3.0.0beta2"; -my $ReleaseDate = "18 Nov 2006"; +my $Version = "3.0.0beta3"; +my $ReleaseDate = "3 Dec 2006"; my $DistDir = "dist/BackupPC-$Version"; my @PerlSrc = qw(