RPM2::LocalInstalled - Perl extension that returns a list of locally installed RPMs
use RPM2::LocalInstalled; my $rpms = RPM2::LocalInstalled->new(); my $all_rpms = $rpms->list_all(); my $newest_rpms = $rpms->list_newest(); my $older_rpms = $rpms->list_older(); $all_rpms is a hash with the rpm package name as hash keys. Behind the hash key there will be an array containing a hash of all tags you requested (or the default tags: version release epoch) from the different packages installed (if more than one is installed (often happens for the kernel package). $newest_rpms is a hash, but containing only one hash, containing the tags you requested. $older_rpms is 'the difference between $all_rpms and $newest_rpms. It lists only older packages. The ones that should be removed sooner or later... You can define the tags @ new this way (example): my $rpms = RPM2::LocalInstalled->new( tags => [ qw/group size packager license/ ], ); Note, that RPM2::LocalInstalled will allways add the default tags (version, release, epoch), as they are used in newest_rpms() for version comparison.
RPM2::LocalInstalled is a wrapper around RPM2. RPM2::LocalInstalled will return lists of locally installed RPMs. This is usefully for comparing with a list of updates, eg. from Config::YUM.
None by default.
RPM2 Sort::Version
Oliver Falk, <oliver@linux-kernel.at>
Copyright (C) 2005 by Oliver Falk
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install RPM2::LocalInstalled, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPM2::LocalInstalled
CPAN shell
perl -MCPAN -e shell install RPM2::LocalInstalled
For more information on module installation, please visit the detailed CPAN module installation guide.