Rpm -V Packages Parsers - command /bin/rpm -V <packages>
Parsers provided in this module includes:
RpmVPackage - command /bin/rpm -V <package>
- class insights.parsers.rpm_v_packages.RpmVPackage(context, extra_bad_lines=None)[source]
Bases:
CommandParserClass for parsing
/bin/rpm -V <package>command.- discrepancies
Every dictionary contains information about one entry
- Type:
list of dictionaries
- error_lines
The error messages from the command rpm -V <package>
- Type:
list of strings
- Raises:
SkipComponents -- When a package is not installed and no error is reported.
Sample output of this command is:
..?...... c /etc/sudoers ..?...... /usr/bin/sudo ..?...... /usr/bin/sudoreplay missing /var/db/sudo/lectured (Permission denied)
OR:
error: rpmdb: BDB0113 Thread/process 259/139 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 - (-30973)
Examples
>>> type(rpm_v_pkg) <class 'insights.parsers.rpm_v_packages.RpmVPackage'> >>> rpm_v_pkg.package_name 'sudo' >>> len(rpm_v_pkg.discrepancies) 4 >>> sorted(rpm_v_pkg.discrepancies[0].items()) [('attributes', '..?......'), ('file', '/etc/sudoers'), ('line', '..?...... c /etc/sudoers'), ('mark', 'c')] >>> "error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery" in rpm_v_pkg.error_lines True