aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Youri/Repository/Mandriva_upload.pm26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm
index 73f7e96..64c111a 100644
--- a/lib/Youri/Repository/Mandriva_upload.pm
+++ b/lib/Youri/Repository/Mandriva_upload.pm
@@ -29,6 +29,7 @@ memoize('_get_section', '_get_media_config');
my %translate_arch = (
i386 => 'i586',
+ sparc64 => 'sparcv9',
);
sub _init {
@@ -83,7 +84,7 @@ sub set_arch_changed {
my ($self, $target, $arch) = @_;
if ($arch eq 'noarch') {
$self->{_arch_changed}{$_} = 1 foreach @{$self->{_arch}{$target}}
- } elsif ($arch eq 'noarch') {
+ } elsif ($arch eq 'src') {
$self->{_arch_changed} = $self->{_src}
} else {
$self->{_arch_changed}{$arch} = 1
@@ -159,6 +160,13 @@ sub get_install_path {
return $self->_get_path($package, $target, $user_context, $app_context);
}
+
+sub get_distribution_paths {
+ my ($self, $package, $target) = @_;
+
+ return $self->_get_distribution_paths($package, $target);
+}
+
sub get_archive_path {
my ($self, $package, $target, $user_context, $app_context) = @_;
@@ -177,6 +185,7 @@ sub _get_path {
my $section = $self->_get_section($package, $target, $user_context, $app_context);
my $arch = $package->get_arch();
+ $arch = $translate_arch{$arch} || $arch;
if ($arch eq 'noarch') {
$arch = $self->{_noarch}
} elsif ($arch eq 'src') {
@@ -185,9 +194,24 @@ sub _get_path {
"$target/$arch/media/$section"
}
+sub _get_distribution_paths {
+ my ($self, $package, $target) = @_;
+
+ my $arch = $package->get_arch();
+ $arch = $translate_arch{$arch} || $arch;
+ if ($arch eq 'noarch') {
+ map { "$target/$_" } $self->get_extra_arches;
+ } elsif ($arch eq 'src') {
+ die "no way to get distribution path using a $arch package";
+ } else {
+ "$target/$arch";
+ }
+}
+
sub get_arch {
my ($self, $package, $target, $user_context, $app_context) = @_;
my $arch = $package->get_arch();
+ $arch = $translate_arch{$arch} || $arch;
if ($arch eq 'noarch') {
$arch = $self->{_noarch}
}