diff options
-rw-r--r-- | lib/Youri/Repository/Mandriva_upload_pre.pm | 5 |
1 files 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') { |