wok-stable view ocsinventory-agent/stuff/Tazpkg.pm @ rev 3679

Fix: ocsinventory-agent. Add Tazpkg.pm. Fix filesystem reports.
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Jul 12 23:18:03 2009 +0200 (2009-07-12)
parents
children 894c779750dc
line source
1 package Ocsinventory::Agent::Backend::OS::Generic::Packaging::Tazpkg;
3 use strict;
4 use warnings;
6 sub check { can_run("tazpkg") }
8 sub run {
9 my $params = shift;
10 my $inventory = $params->{inventory};
12 # use dpkg-query -W -f='${Package}|||${Version}\n'
13 foreach (`tazpkg list `){
14 if (/^(\S+)\s+([0-9]+.*)\s+(.*)/) {
15 $inventory->addSoftwares({
16 'NAME' => $1,
17 'VERSION' => $2,
18 });
19 }
20 }
22 }
24 1;