Quantcast
Channel: Ocsinventory Q&A - Recent questions
Viewing all articles
Browse latest Browse all 4370

Generic packaging deb with no size

$
0
0

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*)---(.*)/) {

 


Viewing all articles
Browse latest Browse all 4370

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>