"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm" between
Ocsinventory-Unix-Agent-2.6.1.tar.gz and Ocsinventory-Unix-Agent-2.8.0.tar.gz

About: Ocsinventory-Agent is a Linux agent for OCS Inventory NG.

Deb.pm  (Ocsinventory-Unix-Agent-2.6.1):Deb.pm  (Ocsinventory-Unix-Agent-2.8.0)
skipping to change at line 41 skipping to change at line 41
$key =~ s/(\s+):.+/$1/; $key =~ s/(\s+):.+/$1/;
$statinfo{$key}=$value; $statinfo{$key}=$value;
} }
# Use binary:Package to see all packages (amd64,deb) with dpkg > 1162 # Use binary:Package to see all packages (amd64,deb) with dpkg > 1162
my $ver=`dpkg --list dpkg | tail -n 1 | cut -d" " -f14`; my $ver=`dpkg --list dpkg | tail -n 1 | cut -d" " -f14`;
$ver=~chomp($ver); $ver=~chomp($ver);
my $vers=$common->convertVersion($ver,4); my $vers=$common->convertVersion($ver,4);
if ($vers > 1162 ){ if ($vers > 1162 ){
@infos=`dpkg-query --show --showformat='\${binary:Package}---\${Architec ture}---\${Version}---\${In stalled-Size}---\${Status}---\${Homepage}---\${De scription}\n'`; @infos=`dpkg-query --show --showformat='\${binary:Package}---\${Architec ture}---\${Version}---\${Installed-Size}---\${Status}---\${Homepage}---\${Descri ption}\n'`;
} else { } else {
@infos=`dpkg-query --show --showformat='\${Package}---\${Architecture}-- -\${Version}---\${Installed -Size}---\${Status}---\${Homepage}---\${Descripti on}\n'`; @infos=`dpkg-query --show --showformat='\${Package}---\${Architecture}-- -\${Version}---\${Installed-Size}---\${Status}---\${Homepage}---\${Description}\ n'`;
} }
foreach my $line (@infos) { foreach my $line (@infos) {
next if $line =~ /^ /; next if $line =~ /^ /;
chomp $line; chomp $line;
my @deb=split("---",$line); my @deb=split("---",$line);
if ($deb[4] && $deb[4] !~ / installed/) { if ($deb[4] && $deb[4] !~ / installed/) {
$logger->debug("Skipping $deb[0] package as not installed, status='$ deb[4]'"); $logger->debug("Skipping $deb[0] package as not installed, status='$ deb[4]'");
next; next;
} }
$key=$deb[0]; $key=$deb[0];
if (exists $statinfo{$key}) { if (exists $statinfo{$key}) {
$common->addSoftware ({ $common->addSoftware ({
'NAME' => $deb[0], 'NAME' => $deb[0],
'ARCHITECTURE' => $deb[1], 'ARCHITECTURE' => $deb[1],
'VERSION' => $deb[2], 'VERSION' => $deb[2],
'FILESIZE' => $deb[3]*1024, 'FILESIZE' => ( $deb[3] || 0 ) * 1024,
'PUBLISHER' => $deb[5], 'PUBLISHER' => $deb[5],
'INSTALLDATE' => $statinfo{$key}, 'INSTALLDATE' => $statinfo{$key},
'COMMENTS' => $deb[6], 'COMMENTS' => $deb[6],
'FROM' => 'deb' 'FROM' => 'deb'
}); });
} }
} }
} }
1; 1;
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)