diff options
author | Florent Villard <warly@mandriva.com> | 2006-09-04 07:02:02 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-09-04 07:02:02 +0000 |
commit | ebcaa03738159dcdfcc4e7dfd82d9828964c02b7 (patch) | |
tree | 9da16e640fc08452c0b8e704faa38586a27bd68e /lib/Youri/Upload | |
parent | 037563129a3094e812fc84453f0b9fc44207386b (diff) | |
download | mga-youri-core-ebcaa03738159dcdfcc4e7dfd82d9828964c02b7.tar mga-youri-core-ebcaa03738159dcdfcc4e7dfd82d9828964c02b7.tar.gz mga-youri-core-ebcaa03738159dcdfcc4e7dfd82d9828964c02b7.tar.bz2 mga-youri-core-ebcaa03738159dcdfcc4e7dfd82d9828964c02b7.tar.xz mga-youri-core-ebcaa03738159dcdfcc4e7dfd82d9828964c02b7.zip |
fix version checking
Diffstat (limited to 'lib/Youri/Upload')
-rw-r--r-- | lib/Youri/Upload/Check/Version.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Youri/Upload/Check/Version.pm b/lib/Youri/Upload/Check/Version.pm index 6ba0502..efe8993 100644 --- a/lib/Youri/Upload/Check/Version.pm +++ b/lib/Youri/Upload/Check/Version.pm @@ -37,7 +37,9 @@ 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 { $_[0]->get_source_package ne $package->get_source_package }); + my $source = $package->get_source_package; + my ($package_version) = $source =~ /-([^-]+)-[^-]+\.src\.rpm$/; + my @revisions = $repository->get_revisions($package, $target, $define, sub { my $source_package = $_[0]->get_source_package; my ($version) = $source_package =~ /-([^-]+)-[^-]+\.src\.rpm$/; $version ne $package_version }); if (@revisions) { $self->{_error} = "VERSION FREEZE, package @revisions of different versions exist in cooker\n"; return 0 |