Installed packages on Gentoo

Bug #873377 reported by Christophe Borivant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Medium
Frank

Bug Description

the Gentoo.pm module uses equery to list all installed packages.
The syntax and dfault behaviour of equery changed in the last releases.
I've been able to get the correct list changing only 2 lines.
Here is the diff beetween the 2.0.1 version and mine :

--- Ocsinventory-Unix-Agent-2.0.1/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Gentoo.pm 2011-09-08 16:54:06.000000000 +0200
+++ Ocsinventory-Unix-Agent-2.0.1-new/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Gentoo.pm 2011-10-13 16:07:31.887403860 +0200
@@ -10,8 +10,8 @@
   my $common = $params->{common};

 # TODO: This had been rewrite from the Linux agent _WITHOUT_ being checked!
- foreach (`equery list -i`){
- if (/^([a-z]\w+-\w+\/\.*)-([0-9]+.*)/) {
+ foreach (`equery list --format='\$cp \$fullversion' '*'`){
+ if (/^(.*) (.*)/) {
       $common->addSoftware({
          'NAME' => $1,
          'VERSION' => $2,

Revision history for this message
mortheres (mortheres) wrote :

Hi,

Thanks a lot for your report and your patch. I do not have a Gentoo system on my hand and I just want to know if "equery list --format='\$cp \$fullversion' '*'" command will work on older Gentoo systems. Do you have an older Gentoo system to test ? I will try using a Gentoo live CD but it could be glad if you confirm that it works on older Gentoo systems.

Kind regards,

Guillaume

Changed in ocsinventory-unix-agent:
assignee: nobody → mortheres (mortheres)
importance: Undecided → Medium
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: New → Fix Committed
assignee: mortheres (mortheres) → Frank (frank-bourdeau)
mortheres (mortheres)
Changed in ocsinventory-unix-agent:
milestone: none → 2.1rc1
Frank (frank-bourdeau)
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.