diff options
author | Florent Villard <warly@mandriva.com> | 2006-10-23 11:48:35 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-10-23 11:48:35 +0000 |
commit | 0acec4125e2e51cfb61c1151e99383cc6cd72b41 (patch) | |
tree | 6b476c98581f4950a132f67c717655b137fbd8b0 /lib/Youri | |
parent | eb7374291e7d8978cd45895532832fde90ec3029 (diff) | |
download | mga-youri-submit-0acec4125e2e51cfb61c1151e99383cc6cd72b41.tar mga-youri-submit-0acec4125e2e51cfb61c1151e99383cc6cd72b41.tar.gz mga-youri-submit-0acec4125e2e51cfb61c1151e99383cc6cd72b41.tar.bz2 mga-youri-submit-0acec4125e2e51cfb61c1151e99383cc6cd72b41.tar.xz mga-youri-submit-0acec4125e2e51cfb61c1151e99383cc6cd72b41.zip |
must return an empty value
Diffstat (limited to 'lib/Youri')
-rw-r--r-- | lib/Youri/Submit/Check/ACL.pm | 1 | ||||
-rw-r--r-- | lib/Youri/Submit/Check/Queue_recency.pm | 1 | ||||
-rw-r--r-- | lib/Youri/Submit/Check/Rpmlint.pm | 2 | ||||
-rw-r--r-- | lib/Youri/Submit/Check/SVN.pm | 3 | ||||
-rw-r--r-- | lib/Youri/Submit/Check/Source.pm | 1 | ||||
-rw-r--r-- | lib/Youri/Submit/Check/Version.pm | 20 |
6 files changed, 18 insertions, 10 deletions
diff --git a/lib/Youri/Submit/Check/ACL.pm b/lib/Youri/Submit/Check/ACL.pm index cec8f0e..7e13dcd 100644 --- a/lib/Youri/Submit/Check/ACL.pm +++ b/lib/Youri/Submit/Check/ACL.pm @@ -46,6 +46,7 @@ sub run { } } } + return } sub get_acl { diff --git a/lib/Youri/Submit/Check/Queue_recency.pm b/lib/Youri/Submit/Check/Queue_recency.pm index 208575f..9ffbacc 100644 --- a/lib/Youri/Submit/Check/Queue_recency.pm +++ b/lib/Youri/Submit/Check/Queue_recency.pm @@ -26,6 +26,7 @@ sub run { if (@newer_revisions) { return "Newer revisions already exists for $target in upload queue: " . join(', ', @newer_revisions); } + return } =head1 COPYRIGHT AND LICENSE diff --git a/lib/Youri/Submit/Check/Rpmlint.pm b/lib/Youri/Submit/Check/Rpmlint.pm index 2745e69..793d0f4 100644 --- a/lib/Youri/Submit/Check/Rpmlint.pm +++ b/lib/Youri/Submit/Check/Rpmlint.pm @@ -54,6 +54,7 @@ sub _init { croak "no results to check" unless $options{results}; croak "fatal should be an arrayref" unless ref $options{results} eq 'ARRAY'; + $self->{_config} = $options{config}; $self->{_path} = $options{path}; $self->{_pattern} = '^(?:' . join('|', @{$options{results}}) . ')$'; } @@ -68,6 +69,7 @@ sub run { open(RPMLINT, "$command |") or die "Can't run $command: $!"; while (my $line = <RPMLINT>) { my ($id, $value) = $line =~ /^[EW]: \S+ (\S+) (.*)$/; + $id or next; if ($id =~ /$self->{_pattern}/o) { push(@errors, "$id $value"); } diff --git a/lib/Youri/Submit/Check/SVN.pm b/lib/Youri/Submit/Check/SVN.pm index 8295656..a3002f0 100644 --- a/lib/Youri/Submit/Check/SVN.pm +++ b/lib/Youri/Submit/Check/SVN.pm @@ -37,7 +37,7 @@ sub run { return } - $package->is_source or return 1; + $package->is_source or return; my $file = $package->get_file_name; my $srpm_name = $package->get_canonical_name; if ($repository->package_in_svn($srpm_name)) { @@ -47,6 +47,7 @@ sub run { print "Package $file is correct\n"; } } + return } sub simple_prompt { diff --git a/lib/Youri/Submit/Check/Source.pm b/lib/Youri/Submit/Check/Source.pm index 962b709..d9cc0c1 100644 --- a/lib/Youri/Submit/Check/Source.pm +++ b/lib/Youri/Submit/Check/Source.pm @@ -31,6 +31,7 @@ sub run { if (!$package->is_source()) { return "Package $file is not a source rpm"; } + return } =head1 COPYRIGHT AND LICENSE diff --git a/lib/Youri/Submit/Check/Version.pm b/lib/Youri/Submit/Check/Version.pm index 2d3d268..96a72e2 100644 --- a/lib/Youri/Submit/Check/Version.pm +++ b/lib/Youri/Submit/Check/Version.pm @@ -45,15 +45,17 @@ sub run { if ($section !~ /$opt->{authorized_sections}/) { return "FREEZE: repository $target section $section is frozen, you can still submit your packages in testing\nTo do so use your.devel --define section=<section> $target <package 1> <package 2> ... <package n>"; } - } - my $source = $package->get_source_package; - my ($package_version) = $source =~ /-([^-]+)-[^-]+\.src\.rpm$/; - $define->{arch} = 'src'; - my @revisions = $repository->get_revisions($package, $target, $define, sub { my $source_package = $_[0]->get_source_package; my ($version) = $source_package =~ /-([^-]+)-[^-]+\.src\.rpm$/; print STDERR "Found version $version\n"; URPM::ranges_overlap("== $version", "< $package_version") }); - $define->{arch} = ''; - if (@revisions) { - return "VERSION FREEZE, package @revisions of different versions exist in cooker\n"; - } + } else { + my $source = $package->get_source_package; + my ($package_version) = $source =~ /-([^-]+)-[^-]+\.src\.rpm$/; + $define->{arch} = 'src'; + my @revisions = $repository->get_revisions($package, $target, $define, sub { my $source_package = $_[0]->get_source_package; my ($version) = $source_package =~ /-([^-]+)-[^-]+\.src\.rpm$/; print STDERR "Found version $version\n"; URPM::ranges_overlap("== $version", "< $package_version") }); + $define->{arch} = ''; + if (@revisions) { + return "FREEZE, package @revisions of different versions exist in $target\n"; + } + } + return } =head1 COPYRIGHT AND LICENSE |