David Nutter wrote:
On Thu, Oct 22, 2009 at 03:12:40PM +0100, David Nutter wrote:

*snip*

Anyway, findings:

1) There appears to be bugs in NOCPulse::Notif::FileQueue->_filelist
   and NOCPulse::Notif::ContactGroup->add_destination. See notes below for
   details. I'm not sure if this is a problem with my environment or a
   true bug in NOCpulse. If desired I can provide a patch - about 3
lines of changes in total.

I think I've found the problem. From perldoc Class::MethodMaker::array

"
...
Note that this reference is no longer a direct reference to the
storage, in contrast to Class::Method- Maker v1.  This is to protect
encapsulation.  See x_ref if you need that functionality (and are
prepared to take the associ- ated risk.)  This function no longer
auto-expands arrayrefs input as arguments, since that makes it awkward
to set individual values to arrayrefs.  See x_setref for that
functionality.
...
"

So, with other versions of MethodMaker $ContactGroup->destinations and
$FileQueue->_files would return a direct reference to the list. The
current EPEL version of MethodMaker no longer does this and so code
like push(@{$ContactGroup->destinations},$dest); doesn't work. Fix is
either to explicitly use the MethodMaker V1 compatibility mode (which
does return a direct ref) or just fix the code to play nice with V2.

I would prefer to make it straight in V2 mode.
Anyway, thx for you investigation. May I ask you to send for your changes?
https://fedorahosted.org/spacewalk/wiki/PatchProcess

I will look at your changes next week and will check that V2 reference to the list (unless you come with solution first).

--
Miroslav Suchy
Red Hat Satellite Engineering

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to