diff options
-rw-r--r-- | lib/Youri/Repository/Mandriva_upload_pre.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/Youri/Repository/Mandriva_upload_pre.pm b/lib/Youri/Repository/Mandriva_upload_pre.pm index efd2d16..32efed0 100644 --- a/lib/Youri/Repository/Mandriva_upload_pre.pm +++ b/lib/Youri/Repository/Mandriva_upload_pre.pm @@ -79,7 +79,7 @@ sub get_revisions { print "Looking for package $package revisions for $target\n" if $self->{_verbose} > 0; - my $arch = $package->get_arch; + my $arch = $define->{arch} || $package->get_arch; if ($arch eq 'src') { $arch = 'SRPMS' } else { @@ -87,12 +87,13 @@ sub get_revisions { } my @packages; foreach my $dir ('main', 'contrib') { + print "Looking into $self->{_install_root}/$target/$arch/$dir/release\n"; push @packages, map { $self->get_package_class()->new(file => $_) } $self->get_files( $self->{_install_root}, "$target/$arch/$dir/release" , - $self->get_package_class()->get_pattern($package->get_name(),undef, undef, $package->get_arch()) + $self->get_package_class()->get_pattern($package->get_name(),undef, undef, $arch) ); } @@ -118,6 +119,15 @@ sub get_upload_dir { $self->{_upload_root} . "/$media_path/$force/$arch_path/" } +sub get_arch { + my ($self, $package, $target, $define) = @_; + my $arch = $package->get_arch(); + if ($arch eq 'noarch') { + $arch = $self->{_noarch} + } + $arch +} + sub get_install_path { my ($self, $package, $target, $define) = @_; |