aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2007-02-14 12:54:25 +0000
committerFlorent Villard <warly@mandriva.com>2007-02-14 12:54:25 +0000
commitb633b75223b178c24022d7a78a52a4ced7e7a6c9 (patch)
tree02faa8bc22eb70da921ca6f944d3d09c1a1d1272 /lib/Youri
parent4d459e0e2f2b93e7589df76151948dd13263e47f (diff)
downloadmga-youri-core-b633b75223b178c24022d7a78a52a4ced7e7a6c9.tar
mga-youri-core-b633b75223b178c24022d7a78a52a4ced7e7a6c9.tar.gz
mga-youri-core-b633b75223b178c24022d7a78a52a4ced7e7a6c9.tar.bz2
mga-youri-core-b633b75223b178c24022d7a78a52a4ced7e7a6c9.tar.xz
mga-youri-core-b633b75223b178c24022d7a78a52a4ced7e7a6c9.zip
add support for sparc64 stored in sparcv9
Diffstat (limited to 'lib/Youri')
-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}
}