aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-09-04 06:12:49 +0000
committerFlorent Villard <warly@mandriva.com>2006-09-04 06:12:49 +0000
commit1bf3432ec4284210f719e90195b842538c500b30 (patch)
treecae57b6fadebd71ea02eea92643418628ca854b6
parent936e4f3bc16c7795c72366b1f447024f4fd9ceb6 (diff)
downloadmga-youri-core-1bf3432ec4284210f719e90195b842538c500b30.tar
mga-youri-core-1bf3432ec4284210f719e90195b842538c500b30.tar.gz
mga-youri-core-1bf3432ec4284210f719e90195b842538c500b30.tar.bz2
mga-youri-core-1bf3432ec4284210f719e90195b842538c500b30.tar.xz
mga-youri-core-1bf3432ec4284210f719e90195b842538c500b30.zip
check the source, fix description
-rw-r--r--lib/Youri/Upload/Check/Version.pm12
1 files 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