wok-stable annotate ocsinventory-agent/stuff/Tazpkg.pm @ rev 7230

Up: xfsprogs to 3.1.4.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Nov 12 03:57:40 2010 +0000 (2010-11-12)
parents db6394fb176f
children 7e463c50f245
rev   line source
erjo@3679 1 package Ocsinventory::Agent::Backend::OS::Generic::Packaging::Tazpkg;
erjo@3679 2
erjo@3679 3 use strict;
erjo@3679 4 use warnings;
erjo@3679 5
erjo@3679 6 sub check { can_run("tazpkg") }
erjo@3679 7
erjo@3679 8 sub run {
erjo@3680 9 my $params = shift;
erjo@3680 10 my $inventory = $params->{inventory};
erjo@3679 11
erjo@3680 12 # use tazpkg list\n'
erjo@3680 13 foreach (`tazpkg list `){
erjo@3680 14 next if (/List of/);
erjo@3680 15 next if (/packages installed/);
erjo@3680 16
erjo@3680 17 if (/^(\S+)\[24G\s+(\S+)\[42G\s+(\S+)/) {
erjo@3680 18 $inventory->addSoftwares({
erjo@3680 19 'NAME' => $1,
erjo@3680 20 'VERSION' => $2,
erjo@3680 21 'COMMENTS' => $3
erjo@3680 22 });
erjo@3680 23 }
erjo@3680 24 }
erjo@3679 25
erjo@3679 26 }
erjo@3679 27
erjo@3679 28 1;