Hello, Here is a short patch which makes monitoring email notifications work again for me. See thread "Monitoring and notifications" on spacewalk-list for full details.
The issue appears to be a reliance on MethodMaker returning a reference to the underlying storage for list-type class members. This no longer happens in MethodMaker 2.0.8, the current version in EPEL 5. There is a wider issue of reliance on Class::MethodMaker::V1Compat throughout the NOCPulse perl code which may well be causing other bugs/issues as the compatibility module is not 100% compatible. I considered submitting patches to fix this as well but I think there's too much code to change at once, especially for a n00b like me. Most of the changes seem to be trivial such as rewriting the class initialisation code in V2 style. Since monitoring notifications are now working for me I'm not sure this really qualifies as a bug. Please advise me on how to proceed. Thanks & regards, -- David Nutter Tel: +44 (0)131 650 4888 BioSS, JCMB, King's Buildings, Mayfield Rd, EH9 3JZ. Scotland, UK Biomathematics and Statistics Scotland (BioSS) is formally part of The Scottish Crop Research Institute (SCRI), a registered Scottish charity No. SC006662
>From 9f6bc5f1991f32e44c0a2ea466317f7d07548988 Mon Sep 17 00:00:00 2001 From: David Nutter <dav...@elrond.bioss.sari.ac.uk> Date: Tue, 27 Oct 2009 11:59:28 +0000 Subject: [PATCH] Fix to use MethodMaker-provided accessor methods for list types. --- monitoring/NPalert/ContactGroup.pm | 2 +- monitoring/NPalert/FileQueue.pm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monitoring/NPalert/ContactGroup.pm b/monitoring/NPalert/ContactGroup.pm index 73e0213..fe25f26 100644 --- a/monitoring/NPalert/ContactGroup.pm +++ b/monitoring/NPalert/ContactGroup.pm @@ -27,7 +27,7 @@ sub new_strategy_for_alert { sub add_destination { ##################### my ($self,$destination)=...@_; - push(@{$self->destinations},$destination); + $self->push_destinations($destination); } ############################## diff --git a/monitoring/NPalert/FileQueue.pm b/monitoring/NPalert/FileQueue.pm index 4a1f89b..cfd400d 100644 --- a/monitoring/NPalert/FileQueue.pm +++ b/monitoring/NPalert/FileQueue.pm @@ -33,10 +33,10 @@ sub _filelist { $Log->log(9,`ls -alt`,"\n"); my @files=glob("*"); - $Log->dump(9,"\...@files are ",@files,"\n(@files)\n"); + $Log->dump(9,"\...@files are ",\...@files,"\n(@files)\n"); # Prepend the directory name to the file names found - @{$self->_files}=map { $self->directory . "/$_" } @files; + $self->_files( (map { $self->directory . "/$_" } @files) ); $Log->dump(9,"_files are ",$self->_files,"\n(_files)\n"); chdir $dir; return $self->_files; -- 1.5.5.6
_______________________________________________ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel