From 037563129a3094e812fc84453f0b9fc44207386b Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Mon, 4 Sep 2006 06:14:38 +0000 Subject: noarch must be replaced for the search; include arch in the search pattern for upload queue check --- lib/Youri/Repository/Mandriva_upload_pre.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Youri/Repository/Mandriva_upload_pre.pm b/lib/Youri/Repository/Mandriva_upload_pre.pm index 2132e9c..efd2d16 100644 --- a/lib/Youri/Repository/Mandriva_upload_pre.pm +++ b/lib/Youri/Repository/Mandriva_upload_pre.pm @@ -198,6 +198,7 @@ sub _get_section { # try to find section automatically my $arch = $package->get_arch(); + $arch = $self->{_noarch} if $arch eq 'noarch'; my $source_pattern = PACKAGE_CLASS->get_pattern( $package->get_canonical_name(), @@ -217,7 +218,6 @@ sub _get_section { # a suitable source patten in source directory # a suitable binary patten in binary directory foreach my $dir (qw/main contrib/) { - print "Checking $self->{_install_root}, SRPMS/$dir, $source_pattern\n" if $self->{_verbose}; next unless $self->get_files( $self->{_install_root}, @@ -242,7 +242,8 @@ sub _get_section { sub get_upload_newer_revisions { my ($self, $package, $target, $define) = @_; croak "Not a class method" unless ref $self; - my $pattern = $self->get_package_class()->get_pattern($package->get_name()); + my $arch = $package->get_arch(); + my $pattern = $self->get_package_class()->get_pattern($package->get_name(), undef, undef, $arch); print "Looking for package $package revisions for $target in $self->{_upload_root} (pattern $pattern)\n"; my @packages; foreach my $dir ('cooker', 'contrib') { -- cgit v1.2.1