2.0rc4 package download dies with Perl error

Bug #772436 reported by Steve Gaarder
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Medium
mortheres

Bug Description

Environment: Unix Agent 2.0rc4 running on Scientific Linux 5, kernel
2.6.18-238.5.1.el5 x86_64

Action: deploy a package (I used the "store" option

Result: the file is stored, but success is never reported and the
download process fails with this error:

Can't call method "debug" on unblessed reference at
/usr/lib/perl5/site_perl/5.8.8/Ocsinventory/Agent/Modules/Download.pm
line 963.

What's going on: the error occurs in a call to the subroutine done()
in Download.pm. The routine is called in three places, and in two of
them (lines 596 and 614) the second argument, $suffix, is missing, so
what should be $logger is interpreted as $suffix, and so on down the
line. I fixed it by adding an argument of "_NONE_" on line 614:

- done($_,$logger,$context,$messages,$settings);
+ done($_,'_NONE_',$logger,$context,$messages,$settings);

I'm not sure if _NONE_ is the right value, but it seems to work. THe
same thing needs to be done on line 574.

mortheres (mortheres)
Changed in ocsinventory-unix-agent:
assignee: nobody → mortheres (mortheres)
Revision history for this message
mortheres (mortheres) wrote :

Hi Steve,

Thanks a lot for your report. The problem was due to several mistakes in arguments call in the "done" subroutine. I join a patch to correct this bug. Can you test this patch to see if it corrects the problem for you too ? If it is ok, I will add this patch in repository :) :).

Kind regards,

Guillaume

Changed in ocsinventory-unix-agent:
milestone: none → 2.0
importance: Undecided → Medium
Revision history for this message
mortheres (mortheres) wrote :

Hi,

The patch has been integrated in revision 1044 of the stable-2.0 branch of OCS Unix agent: http://bazaar.launchpad.net/~ocsinventory-dev/ocsinventory-unix-agent/stable-2.0/revision/1044 . The fix will be released in the final OCS 2.0 release.

Kind regards,

Guillaume

Changed in ocsinventory-unix-agent:
status: New → Fix Committed
mortheres (mortheres)
Changed in ocsinventory-unix-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.