source: ocsinventory-agent/trunk/fuentes/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Gentoo.pm @ 468

Last change on this file since 468 was 468, checked in by mabarracus, 4 years ago

Copyt trusty code

File size: 451 bytes
Line 
1package Ocsinventory::Agent::Backend::OS::Generic::Packaging::Gentoo;
2
3use strict;
4use warnings;
5
6sub check {can_run("equery")}
7
8sub run {
9  my $params = shift;
10  my $common = $params->{common};
11
12# TODO: This had been rewrite from the Linux agent _WITHOUT_ being checked!
13  foreach (`equery list -i`){
14    if (/^([a-z]\w+-\w+\/\.*)-([0-9]+.*)/) {
15      $common->addSoftware({
16          'NAME'          => $1,
17          'VERSION'       => $2,
18          });
19    }
20  }
21}
22
231;
Note: See TracBrowser for help on using the repository browser.