#!/usr/bin/perl -w

use strict;
use warnings;
use Carp;

use Test::Repocop::Log;
use Test::Repocop::Common;
use RPM::Source::Editor 0.9216;
use RPM::Source::Transformation::GenericUtility;
use RPM::Source::Transformation::CheckIfChangedPlayer;
use Test::Repocop::RepocopResource;
use Test::Repocop::FixscriptFactory;
our @ISA=qw/RPM::Source::Transform/;
#our @LONGOPT_POD2USAGE=qw/-verbose 1/;# -exitval 1

$RPM::Source::Transformation::Factory::RaiseRelease::nextrel='qa';
$RPM::Source::Transformation::Factory::RaiseRelease::defaultchangelog='- NMU (by repocop). See http://www.altlinux.org/Tools/Repocop';

our @LONGOPT=(
);
__PACKAGE__->get_and_process_cli_options();

RPM::Source::TransformContainer->init_transformations();
&Test::Repocop::RepocopResource::process_arguments();

__END__

=head1	NAME

repocop-nmu-tool - a tool that repairs srpm using repocop unit tests results.

=head1	SYNOPSIS

B<repocop-nmu-tool>
[B<--changelog> I<changelog entry>]
[B<-h|--help>]
[B<-v|--verbose>]
[B<-q|--quiet>]
[B<--workdir> I<workdir>]
[B<--report> I<warn|fail|skip|experimental|ok>]
[B<--report-et|--report-exclude-test> I<comma separated list of tests>]
[B<--report-it|--report-include-test> I<comma separated list of tests>]
[B<--report-include-distrotests>]
[<src.rpm file or spec>/dir ...]

=head1	DESCRIPTION

B<repocop-nmu-tool> processes results of repocop unit tests, created with
repocop-run command, stored in I<repocop workdir>, and use them to generate
patches or just repair source rpms.
Precise subsets of tests can be selected using B<--include-*>
and B<--exclude-*> options.

=head1	OPTIONS

=over

=item	B<--workdir> I<dir>

Provides alternative location for the Repocop workdir. Repocop workdir
is a place where test results and packages metadata information are stored.
Default is I<~/.repocop>.

=item	B<-h, --help>

Display this help and exit.

=item	B<-v, --verbose>, B<-q, --quiet>

Verbosity level. Multiple -v increase the verbosity level, -q sets it to 0.



=item	B<-r, --report> I<skip|experimental|ok|warn|fail>

The level of test results reported. Test results below this level
are not reported. Default is warn.

=item	B<--report-et, --report-exclude-test> I<comma separated list of tests>

Include all tests exept the given excluded set.

=item	B<--report-it, --report-include-test> I<comma separated list of tests>

Include the given set of tests.

=item	B<--report-include-distrotests>

Include all distrotests.


=back

=head1	ARGUMENTS


List of src.rpm or .spec files or directories containing them.


=head1	AUTHOR

Written by Igor Vlasenko <viy@altlinux.org>.

=head1	ACKNOWLEGEMENTS

To Alexey Torbin <at@altlinux.org>, whose qa-robot package
had a strong influence on repocop.

=head1	COPYING

Copyright (c) 2008-2022 Igor Vlasenko, ALT Linux Team.

This is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation;
either version 2 of the License, or (at your option) any later version.

=cut

