Hi Toomas,
perl 5.14 is more restrictive in the syntax.
I committed the attached patch to the 3.2 branch.
Jean-Louis
Toomas Aas wrote:
Hello!
I'm installing a new Amanda server on FreeBSD 8.2, using FreeBSD ports
which currently provide Amanda 3.2.2. I have successfully made the
first backup, but restore fails:
--
amrecover> add dnetc-freebsd8-amd64.tar.gz
Added file /home/toomas/dnetc-freebsd8-amd64.tar.gz
amrecover> extract
Extracting files from holding disk on host pegasus.raad.tartu.ee.
The following files are needed:
/holding/20110615162722/pegasus.raad.tartu.ee._usr.0
Extracting from file
/holding/20110615162722/pegasus.raad.tartu.ee._usr.0
amrecover - can't talk to tape server: service amidxtaped:
--
And the file is not extracted. Only errors I could find are in
amandad.debug, which are actually Perl warnings:
Thu Jun 16 16:04:36 2011: amandad: ERROR service amidxtaped:
Thu Jun 16 16:04:36 2011: amandad: ERROR service amidxtaped: **
(process:5181): WARNING **: Use of qw(...) as parentheses is
deprecated at
/usr/local/lib/perl5/site_perl/5.14.0/Amanda/Recovery/Clerk.pm line 231.
Thu Jun 16 16:04:36 2011: amandad: ERROR service amidxtaped:
Thu Jun 16 16:04:36 2011: amandad: ERROR service amidxtaped:
Such warnings are reported multiple times about various locations in
Clerk.pm and Planner.pm:
Clerk.pm line 231
Clerk.pm line 265
Planner.pm line 231
Planner.pm line 342
Planner.pm line 393
I modified all these occurrences, adding additional parentheses around
the qw() construct, for example
original:
for my $rq_param qw(dump xfer_src_cb) {
new:
for my $rq_param (qw(dump xfer_src_cb)) {
After that, I could run recovery successfully.
As I am not a Perl programmer and don't really know what it is I did,
I wonder if this is a safe workaround?
Index: ChangeLog
===
--- ChangeLog (revision 4171)
+++ ChangeLog (revision 4173)
@@ -1,3 +1,8 @@
+2011-06-17 Jean-Louis Martineau
+ * perl/Amanda/Changer/robot.pm, perl/Amanda/Recovery/Planner.pm,
+ perl/Amanda/Recovery/Clerk.pm,
+ perl/Amanda/Taper/Scribe.pm: Fix for qw syntax in perl 5.14.
+
2011-06-13 Jean-Louis Martineau
* perl/Amanda/Taper/Worker.pm: s/messsage/message/.
Index: perl/Amanda/Changer/robot.pm
===
--- perl/Amanda/Changer/robot.pm (revision 4171)
+++ perl/Amanda/Changer/robot.pm (revision 4173)
@@ -266,7 +266,7 @@
}
# status-interval, eject-delay, unload-delay
-for my $propname qw(status-interval eject-delay unload-delay) {
+for my $propname (qw(status-interval eject-delay unload-delay)) {
next unless exists $config->{'properties'}->{$propname};
if (@{$config->{'properties'}->{$propname}->{'values'}} > 1) {
return Amanda::Changer->make_error("fatal", undef,
Index: perl/Amanda/Recovery/Planner.pm
===
--- perl/Amanda/Recovery/Planner.pm (revision 4171)
+++ perl/Amanda/Recovery/Planner.pm (revision 4173)
@@ -228,7 +228,7 @@
my $self = shift;
my %params = @_;
-for my $rq_param qw(changer plan_cb dumpspecs) {
+for my $rq_param (qw(changer plan_cb dumpspecs)) {
croak "required parameter '$rq_param' mising"
unless exists $params{$rq_param};
}
@@ -339,7 +339,7 @@
my $self = shift;
my %params = @_;
-for my $rq_param qw(holding_file plan_cb) {
+for my $rq_param (qw(holding_file plan_cb)) {
croak "required parameter '$rq_param' mising"
unless exists $params{$rq_param};
}
@@ -390,7 +390,7 @@
my $self = shift;
my %params = @_;
-for my $rq_param qw(filelist plan_cb) {
+for my $rq_param (qw(filelist plan_cb)) {
croak "required parameter '$rq_param' mising"
unless exists $params{$rq_param};
}
Index: perl/Amanda/Recovery/Clerk.pm
===
--- perl/Amanda/Recovery/Clerk.pm (revision 4171)
+++ perl/Amanda/Recovery/Clerk.pm (revision 4173)
@@ -228,7 +228,7 @@
my $self = shift;
my %params = @_;
-for my $rq_param qw(dump xfer_src_cb) {
+for my $rq_param (qw(dump xfer_src_cb)) {
croak "required parameter '$rq_param' missing"
unless exists $params{$rq_param};
}
@@ -262,7 +262,7 @@
my %params = @_;
$self->dbg("starting recovery");
-for my $rq_param qw(xfer recovery_cb) {
+for my $rq_param (qw(xfer recovery_cb)) {
croak "required parameter '$rq_param' missing"
unless exists $params{$rq_param};
}
Index: perl/Amanda/Taper/Scribe.pm
===
--- perl/Amanda/Taper/Scribe.pm (revision 4171)
+++ perl/Amanda/Taper/Scribe.pm (revision 4173)
@@ -442,7 +442,7 @@
my %params = @_;
my $decide_debug = $A