aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-09-01 10:01:11 +0000
committerFlorent Villard <warly@mandriva.com>2006-09-01 10:01:11 +0000
commit9f371a2af71658a117fbffff07606bdff9e963ce (patch)
tree729b46c2a69a09d26cc7823ff053d8b830e14320 /lib
parent47f5af098580e33c05c5d3d58740c3f7cca654ab (diff)
downloadmga-youri-core-9f371a2af71658a117fbffff07606bdff9e963ce.tar
mga-youri-core-9f371a2af71658a117fbffff07606bdff9e963ce.tar.gz
mga-youri-core-9f371a2af71658a117fbffff07606bdff9e963ce.tar.bz2
mga-youri-core-9f371a2af71658a117fbffff07606bdff9e963ce.tar.xz
mga-youri-core-9f371a2af71658a117fbffff07606bdff9e963ce.zip
better section handling
Diffstat (limited to 'lib')
-rw-r--r--lib/Youri/Repository/Mandriva_upload.pm12
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,
)
);
}