From b7542886542c2805b26140d2a011acc897311e1e Mon Sep 17 00:00:00 2001 From: Marcelo Leitner Date: Thu, 25 Jan 2007 13:18:15 +0000 Subject: - get_revisions should look only on the target media, not on all them. This was preventing from uploading a stable release to main while having a newer and beta one on testing, for example. --- lib/Youri/Repository/Mandriva_upload.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm index fd41ea4..9573eab 100644 --- a/lib/Youri/Repository/Mandriva_upload.pm +++ b/lib/Youri/Repository/Mandriva_upload.pm @@ -358,7 +358,7 @@ sub package_in_svn { my $svn_entry = $ctx->ls("$self->{_svn}/$srpm_name", 'HEAD', 0); if ($svn_entry) { - print "Package $_ is in the SVN\n"; + print "Package $srpm_name is in the SVN\n"; return 1 } } @@ -376,15 +376,12 @@ sub get_revisions { my $arch = $user_context->{arch} || $package->get_arch(); my $media_arch = $arch eq 'noarch' ? $self->{_noarch} : $arch; my $path = $arch eq 'src' ? "$target/SRPMS/" : "$target/$media_arch/media"; - my $media = $self->_get_media_config($target); - my @packages; + my $media = $self->_get_section($package, $target, $user_context, $app_context); my $name = $package->get_name(); - foreach my $m (keys %{$media->{$media_arch}}) { - push @packages, - map { $self->get_package_class()->new(file => $_) } + my @packages = map { $self->get_package_class()->new(file => $_) } $self->get_files( $self->{_install_root}, - "$path/$m", + "$path/$media", $self->get_package_class()->get_pattern( $name, undef, @@ -392,7 +389,6 @@ sub get_revisions { $arch, ) ); - } @packages = grep { $filter->($_) } @packages if $filter; -- cgit v1.2.1