diff options
Diffstat (limited to 'lib/Youri/Repository')
-rw-r--r-- | lib/Youri/Repository/Mandriva_upload.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm index 01a6813..db36f2d 100644 --- a/lib/Youri/Repository/Mandriva_upload.pm +++ b/lib/Youri/Repository/Mandriva_upload.pm @@ -113,7 +113,7 @@ sub get_upload_dir { return $self->{_upload_root} . "/$self->{_queue}/$target/" . - $self->_get_section($package, $target, $define) . + _get_section($self, $package, $target, $define) . '/' . ($define->{prefix} ? '' : get_group_id($define->{user})) } @@ -208,6 +208,8 @@ sub _get_main_section { sub _get_section { my ($self, $package, $target, $define) = @_; + my $name = $package->get_name(); + print "_get_section target $target packages $name\n"; my $section = $define->{section}; my $media = $self->_get_media_config($target); my $arch = $package->get_arch(); @@ -268,7 +270,7 @@ sub _get_section { $section = $define->{section} unless $section; print STDERR "Can't guess destination: section missing, defaulting to contrib/release" unless $section; - $section = 'contrib/release'; + $section ||= 'contrib/release'; return $section; } @@ -331,6 +333,8 @@ sub get_revisions { my $path = $arch eq 'src' ? "$target/SRPMS/" : "$target/$arch/media"; my $media = $self->_get_media_config($target); my @packages; + my $name = $package->get_name(); + my $arch = $package->get_arch(); foreach my $media (keys %{$media->{$arch}}) { push @packages, map { $self->get_package_class()->new(file => $_) } @@ -338,10 +342,10 @@ sub get_revisions { $self->{_install_root}, "$path/$media", $self->get_package_class()->get_pattern( - $package->get_name(), + $name, undef, undef, - $package->get_arch(), + $arch, ) ); } |