aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-10-12 08:55:52 +0000
committerFlorent Villard <warly@mandriva.com>2006-10-12 08:55:52 +0000
commitc6c75849a40d6b3dd3cdaa14bd443e748822f9c5 (patch)
tree359d9dfc0d7fc0598436578dbc4bd9b9479a5be7 /lib
parentdac4c07159ba71fbb1b51c6ccb7250c91589663c (diff)
downloadmga-youri-core-c6c75849a40d6b3dd3cdaa14bd443e748822f9c5.tar
mga-youri-core-c6c75849a40d6b3dd3cdaa14bd443e748822f9c5.tar.gz
mga-youri-core-c6c75849a40d6b3dd3cdaa14bd443e748822f9c5.tar.bz2
mga-youri-core-c6c75849a40d6b3dd3cdaa14bd443e748822f9c5.tar.xz
mga-youri-core-c6c75849a40d6b3dd3cdaa14bd443e748822f9c5.zip
add get_arch functions (Mandriva_upload_pre is deprecated though)
Diffstat (limited to 'lib')
-rw-r--r--lib/Youri/Repository/Mandriva_upload_pre.pm14
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) = @_;