From 1bf3432ec4284210f719e90195b842538c500b30 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Mon, 4 Sep 2006 06:12:49 +0000 Subject: check the source, fix description --- lib/Youri/Upload/Check/Version.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Youri/Upload/Check/Version.pm b/lib/Youri/Upload/Check/Version.pm index 8042e9f..6ba0502 100644 --- a/lib/Youri/Upload/Check/Version.pm +++ b/lib/Youri/Upload/Check/Version.pm @@ -3,12 +3,12 @@ package Youri::Upload::Check::Version; =head1 NAME -Youri::Upload::Check::Recency - Release check against current target +Youri::Upload::Check::Version - Check if older version already exist in cooker (used in freeze period) =head1 DESCRIPTION -This check plugin rejects packages whose a current or newer revision already -exists for current upload target. +This check plugin rejects new version of packages if they are not mentioned as authorized +in the configuration file or in a non frozen section. =cut @@ -20,8 +20,8 @@ use base qw/Youri::Upload::Check/; sub _init { my $self = shift; my %options = ( - authorized_media => undef, # expected tag values - authorized_packages => undef, # expected tag values + authorized_sections => undef, # sections where check is not done + authorized_packages => undef, # packages which can be uploaded with newer versions @_ ); @@ -37,7 +37,7 @@ sub run { return 1 if $section =~ /$self->{_authorized_sections}/; my $name = $package->get_canonical_name; return 1 if $name =~ /$self->{_authorized_packages}/; - my @revisions = $repository->get_revisions($package, $target, $define, sub { $package->get_version ne $_[0]->get_version }); + my @revisions = $repository->get_revisions($package, $target, $define, sub { $_[0]->get_source_package ne $package->get_source_package }); if (@revisions) { $self->{_error} = "VERSION FREEZE, package @revisions of different versions exist in cooker\n"; return 0 -- cgit v1.2.1