=head1 NAME

Doit::Rpm - commands for dealing with RPM packages

=head1 SYNOPSIS

    use Doit;
    my $doit = Doit->init;
    $doit->add_component('rpm');

    $doit->rpm_install_packages(qw(zsh wget));

    my @missing_packages = $doit->rpm_missing_packages(qw(zsh wget));

=head1 DESCRIPTION

B<Doit::Rpm> is a L<Doit> component providing commands for dealing
with RPM packages. It has to be added to a script using L<Doit's
add_component|Doit/add_component>:

    $doit->add_component('rpm');

=head2 DOIT COMMANDS

The following commands are added to the Doit runner object:

=head3 rpm_install_packages

    my @installed_packages = $doit->rpm_install_packages(@packages);

Make sure that the listed RPM packages are installed (using
L<yum(8)>). Return a list of the packages which were actually
installed during the execution of this command (or the number of
packages in scalar context).

=head3 rpm_missing_packages

    my @missing_packages = $doit->rpm_missing_packages(@packages);

Return the packages out of I<@packages> which are not yet installed.
This is an "informational" command and runs even in dry-run mode.

=head3 rpm_enable_repo

    my $changed = $doit->rpm_enable_repo($repo_name, %options);

Enable a repository I<$repo_name> using C<yum config-manager
--set-enabled>. Return true if a change was actually done.

If the named option C<update> is set to a false value, then no C<yum
update> is done after a change was done. The default is to do the
update.

=head1 AUTHOR

Slaven Rezic <srezic@cpan.org>

=head1 COPYRIGHT

Copyright (c) 2017 Slaven Rezic. All rights reserved.
This module is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=head1 SEE ALSO

L<Doit>, L<yum(8)>, L<rpm(8)>.

=cut
