Hello guys,
Context : ocsinventory-agent on a Debian system
What is wrong : installed packages with an unspecified size are not treated
File : lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/Deb.pm
Goal : the algorithm in this file lists all the packages to add them to the list of softwares. When a packages matches a defined pattern, then it is added to the software list. And if a package does not have a size, then 'Unknown size' is set for the size attribute.
Problem : when a package does not have a size, it does not match the pattern, so it is not added and the 'Unknown size' is never set.
Solution : fix the regex to match packages with no size
---if (/^(\S+)---(\S+)---(\S+)---(.*)/) {
+++if (/^(\S+)---(\S+)---(\S*)---(.*)/) {