Bug 1262571
Summary: | Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm line 1203. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Trever Adams <trever> |
Component: | amanda | Assignee: | Petr Hracek <phracek> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 23 | CC: | fedora, goodyca48, joshua.bakerlepain, martineau.jl, pb, phracek, uwe.menges |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | amanda-3.3.8-1.fc23 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-02-09 09:39:13 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Trever Adams
2015-09-12 23:12:37 UTC
F23 has currently same bug and results in an empty report after amdump with active option "mailto". Mail contents is mostly empty: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: amandabackup@... = Test: /usr/sbin/amreport <HOST> Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm line 1203. Compilation failed in require at (eval 13) line 1. BEGIN failed--compilation aborted at (eval 13) line 1. Proposed diff works: # diff -u /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm.orig /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm --- /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm.orig 2015-06-22 12:17:34.000000000 +0200 +++ /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm 2015-11-14 16:45:12.800335903 +0100 @@ -1200,7 +1200,7 @@ # Do not report driver error if we have a try with dumper my $tries = $alldumps->{$report->{'run_timestamp'}}; - my $to_report = !defined @$tries; + my $to_report = ! @$tries; foreach my $try ( @$tries ) { $to_report = 1 if !defined $try->{'dumper'}; } Please fix current broken versions amanda-server-3.3.7p1-1.fc23.x86_64 amanda-3.3.7p1-1.fc23.x86_64 amanda-client-3.3.7p1-1.fc23.x86_64 amanda-libs-3.3.7p1-1.fc23.x86_64 After applying this patch, it creates a report, but finally states: amreport: Can't use an undefined value as an ARRAY reference at /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm line 1203. I don't know if it's related, but the initial email report sent from amdump was empty, and I had trouble to get the report emailed again. It seems the amreport is empty as soon as the output goes to a pipe. I finally copy&pasted it with tmux from the terminal to a temporary file and emailed that. I think I have a better patch. --- /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm.orig 2015-06-22 12:17:34.000000000 +0200 +++ /usr/lib64/perl5/vendor_perl/Amanda/Report/human.pm 2016-01-12 23:33:26.802368248 +0100 @@ -1200,7 +1200,7 @@ sub get_summary_info # Do not report driver error if we have a try with dumper my $tries = $alldumps->{$report->{'run_timestamp'}}; - my $to_report = !defined @$tries; + my $to_report; foreach my $try ( @$tries ) { $to_report = 1 if !defined $try->{'dumper'}; } amanda-3.3.8 use the following line: my $to_report = !defined $tries || !@$tries; (In reply to Jean-Louis Martineau from comment #5) > amanda-3.3.8 use the following line: > my $to_report = !defined $tries || !@$tries; This change made things work for me. Thanks! This issue should be fixed by commit http://pkgs.fedoraproject.org/cgit/rpms/amanda.git/commit/?h=f23&id=c6e090ceb846020b43893aaac1779faf3551a60e I have included amanda-3.3.8 in rawhide and F23. |