Bug#543422: storebackup: cannot backup in the same place where an old backup resides
this seems to work for me. Can you please double-check? Indeed, it works with the version you sent me. For some reason, Debian's libraries are different. Here is a diff: ===File /tmp/diff=== tucano:~# for f in /tmp/storeBackup/lib/*; do diff -u $f /usr/share/storebackup/lib/$(basename $f); done --- /tmp/storeBackup/lib/checkParam2.pl 2009-08-29 16:24:48.0 +0200 +++ /usr/share/storebackup/lib/checkParam2.pl 2009-07-18 20:09:30.0 +0200 @@ -427,9 +427,6 @@ { my $l = shift; my $errorPart = shift; # where this happens, 'in file at ...' -my $doNotReplaceEnvVar = shift; # 1 or undef - -$doNotReplaceEnvVar = 0 unless defined $doNotReplaceEnvVar; # masking of special characters my $dollar = \001; # mask for \$ @@ -456,9 +453,7 @@ #print dQuote = $dQuote\n; if ($sQuote == -1 and $dQuote == -1) # no quotes { - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, - split(/\s+/, $l)); + push @l, replaceEnvironmentVars(split(/\s+/, $l)); $l = ''; } elsif ($dQuote == -1 or @@ -467,9 +462,7 @@ #print -1- $l\n; if ($l =~ /\A(.*?)\'(.*?)\'(.*)\Z/) { - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, - split(/\s+/, $1)); + push @l, replaceEnvironmentVars(split(/\s+/, $1)); push @l, $2; $l = $3; #print \t, join(' ', @l), + $l\n; @@ -484,11 +477,8 @@ #print -2- $l\n; if ($l =~ /\A(.*?)\(.*?)\(.*)\Z/) { - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, - split(/\s+/, $1)); - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, $2); + push @l, replaceEnvironmentVars(split(/\s+/, $1)); + push @l, replaceEnvironmentVars($2); #print \t, join(' ', @l), + $l\n; $l = $3; } @@ -516,9 +506,7 @@ sub replaceEnvironmentVars { -my ($doNotReplaceEnvVar, $errorPart, @lines) = @_; - -return (@lines) if $doNotReplaceEnvVar; +my (@lines) = @_; my (@newLines); my $l; @@ -546,7 +534,7 @@ } die environment variable \$$env not set\n, - please set \$$env before calling this program $errorPart + please set \$$env before calling this program unless $ENV{$env}; $l =~ s/\$\{?$env\}?/$ENV{$env}/; --- /tmp/storeBackup/lib/storeBackupLib.pl 2009-08-29 16:24:48.0 +0200 +++ /usr/share/storebackup/lib/storeBackupLib.pl2009-07-18 20:09:30.0 +0200 @@ -2173,12 +2173,12 @@ $val =~ s/\\0A/\n/og;# '\n' wiederherstellen $val =~ s/\\5C/\\/og;# '\\' wiederherstellen - my (@val) = # do not replace environment vars - (@{ConfigFile::splitQuotedLine($val, at $checkSumFile.info, 1)}); + my (@val) = + (@{ConfigFile::splitQuotedLine($val, at $checkSumFile.info)}); $metaField{$key} = \...@val; $meta{$key} = $val[0]; - push @meta, $key; # für die Reihenfolge + push @meta, $val[0]; # für die Reihenfolge } close(FILE); unless ($meta{'version'}) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#543422: storebackup: cannot backup in the same place where an old backup resides
I made some changes to the libraries. If you compare against the last official version, that's fine. During some last version(s) I used the interpreter function for lines in the configuration file for reading the info file also. This is fine because it's much more powerful than the old (simple) stuff. But unfortunately, I did not consider that it's able to replace environment variables when it detects a $ sign (like described in the config file comments). I now added a flag to switch off this behaviour. I also added the path/name of the info file for better error messages. Am Montag, 31. August 2009 16:16:13 schrieb Francesco Potorti`: this seems to work for me. Can you please double-check? Indeed, it works with the version you sent me. For some reason, Debian's libraries are different. Here is a diff: ===File /tmp/diff=== tucano:~# for f in /tmp/storeBackup/lib/*; do diff -u $f /usr/share/storebackup/lib/$(basename $f); done --- /tmp/storeBackup/lib/checkParam2.pl 2009-08-29 16:24:48.0 +0200 +++ /usr/share/storebackup/lib/checkParam2.pl 2009-07-18 20:09:30.0 +0200 @@ -427,9 +427,6 @@ { my $l = shift; my $errorPart = shift; # where this happens, 'in file at ...' -my $doNotReplaceEnvVar = shift; # 1 or undef - -$doNotReplaceEnvVar = 0 unless defined $doNotReplaceEnvVar; # masking of special characters my $dollar = \001; # mask for \$ @@ -456,9 +453,7 @@ #print dQuote = $dQuote\n; if ($sQuote == -1 and $dQuote == -1) # no quotes { - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, - split(/\s+/, $l)); + push @l, replaceEnvironmentVars(split(/\s+/, $l)); $l = ''; } elsif ($dQuote == -1 or @@ -467,9 +462,7 @@ #print -1- $l\n; if ($l =~ /\A(.*?)\'(.*?)\'(.*)\Z/) { - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, - split(/\s+/, $1)); + push @l, replaceEnvironmentVars(split(/\s+/, $1)); push @l, $2; $l = $3; #print \t, join(' ', @l), + $l\n; @@ -484,11 +477,8 @@ #print -2- $l\n; if ($l =~ /\A(.*?)\(.*?)\(.*)\Z/) { - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, - split(/\s+/, $1)); - push @l, replaceEnvironmentVars($doNotReplaceEnvVar, - $errorPart, $2); + push @l, replaceEnvironmentVars(split(/\s+/, $1)); + push @l, replaceEnvironmentVars($2); #print \t, join(' ', @l), + $l\n; $l = $3; } @@ -516,9 +506,7 @@ sub replaceEnvironmentVars { -my ($doNotReplaceEnvVar, $errorPart, @lines) = @_; - -return (@lines) if $doNotReplaceEnvVar; +my (@lines) = @_; my (@newLines); my $l; @@ -546,7 +534,7 @@ } die environment variable \$$env not set\n, - please set \$$env before calling this program $errorPart + please set \$$env before calling this program unless $ENV{$env}; $l =~ s/\$\{?$env\}?/$ENV{$env}/; --- /tmp/storeBackup/lib/storeBackupLib.pl2009-08-29 16:24:48.0 +0200 +++ /usr/share/storebackup/lib/storeBackupLib.pl2009-07-18 20:09:30.0 +0200 @@ -2173,12 +2173,12 @@ $val =~ s/\\0A/\n/og;# '\n' wiederherstellen $val =~ s/\\5C/\\/og;# '\\' wiederherstellen - my (@val) = # do not replace environment vars - (@{ConfigFile::splitQuotedLine($val, at $checkSumFile.info, 1)}); + my (@val) = + (@{ConfigFile::splitQuotedLine($val, at $checkSumFile.info)}); $metaField{$key} = \...@val; $meta{$key} = $val[0]; - push @meta, $key; # für die Reihenfolge + push @meta, $val[0]; # für die Reihenfolge } close(FILE); unless ($meta{'version'}) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#543422: storebackup: cannot backup in the same place where an old backup resides
Package: storebackup Version: 3.2-1 Severity: normal I wanted to make a backup in a remote dir where I had a single old backup from 2006. However, storebackup gives an error while reading the old backup's info file. I had to purge it from some variables in order to have storebackup working. It is currently proceeding apparently without problems. The error I got is: environment variable $\/tmp\/ or \/cache\/ or \/Cache\/ or home\/tcp\/satns\/.+\.tr$ or home\/tcp\/satns\/.+\.nam$ or scratch\/freenet\/.*client-temp\/ or scratch\/freenet\/.*store\/ not set please set $\/tmp\/ or \/cache\/ or \/Cache\/ or home\/tcp\/satns\/.+\.tr$ or home\/tcp\/satns\/.+\.nam$ or scratch\/freenet\/.*client-temp\/ or scratch\/freenet\/.*store\/ before calling this program at /usr/share/storebackup/lib/checkParam2.pl line 536, FILE line 12. Appended you find the original info file that causes the error and the modified info file which makes storebackup apparently proceed normally. -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing'), (500, 'testing-proposed-updates') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages storebackup depends on: ii bzip2 1.0.5-3high-quality block-sorting file co ii debianutils 3.2Miscellaneous utilities specific t ii perl 5.10.0-24 Larry Wall's Practical Extraction Versions of packages storebackup recommends: ii libio-compress-bzip2-perl 2.015-3Read and write bzip2-compressed fi storebackup suggests no packages. -- no debconf information ===File /mnt/alabackup/2006.09.16_01.00.08/.md5CheckSums.info.orig=== version=1.3 date=2006.09.16 01.00.08 sourceDir=/ followLinks=0 compress=bzip2 uncompress=bzip2 -d postfix=.bz2 exceptSuffix=.bz2,.deb,.gif,.gpg,.gz,.jpg,.mp3,.mpeg,.mpg,.ogg,.png,.rpm,.tgz,.tif,.tiff,.zip exceptDirsSep=, exceptDirs=/alabackup,/backup,/cdrom,/floppy,/home/backup,/home/cng/pub,/mnt/ala,/mnt/mem,/mnt/tmp,/proc,/scratch/cd,/scratch/ftp/.mirrors/galileo.backup/cvs,/scratch/ftp/.mirrors/galileo.backup/web,/scratch/ftp/.mirrors/internet-drafts/fixed_ids,/scratch/ftp/.mirrors/internet-drafts/incoming,/scratch/ftp/.mirrors/internet-drafts/internet-drafts,/scratch/ftp/.mirrors/internet-drafts/Old,/scratch/ftp/.mirrors/octave-archive/lost+found,/scratch/ftp/.mirrors/octave-archive/mirror,/scratch/ftp/.mirrors/octave-archive/octave-1,/scratch/ftp/.mirrors/octave-archive/octave-2,/scratch/ftp/.mirrors/rfc/bcp,/scratch/ftp/.mirrors/rfc/fyi,/scratch/ftp/.mirrors/rfc/rfc,/scratch/ftp/.mirrors/rfc/rfc-editor,/scratch/ftp/.mirrors/rsvp-linux/dhcp.bootp.rarp,/scratch/ftp/.mirrors/rsvp-linux/fastroute,/scratch/ftp/.mirrors/rsvp-linux/lbl-tools,/scratch/ftp/.mirrors/rsvp-linux/misc,/scratch/ftp/.mirrors/rsvp-linux/pim,/scratch/ftp/.mirrors/rsvp-linux/rsvp,/scratch/ftp/.mirrors/rsvp-linux/TIRPC99,/scratch/pot,/scratch/swap,/var/r includeDirs= exceptPattern=\/tmp\/ or \/cache\/ or \/Cache\/ or home\/tcp\/satns\/.+\.tr$ or home\/tcp\/satns\/.+\.nam$ or scratch\/freenet\/.*client-temp\/ or scratch\/freenet\/.*store\/ includePattern= exceptTypes=Sbc ===File /mnt/alabackup/2006.09.16_01.00.08/.md5CheckSums.info=== version=1.3 date=2006.09.16 01.00.08 sourceDir='/' followLinks=0 compress='bzip2' uncompress='bzip2' '-d' postfix='.bz2' includeDirs= exceptTypes=Sbc -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org