diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-02-25 16:26:08 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-02-25 16:26:08 +0000 |
commit | 8b8834e0de508e4bcb084790032ab87b76ac97e1 (patch) | |
tree | 4cc7b60205d4fd3792450c3eeda28dd6ea4274ef | |
parent | 9440098fa485d03af92b4c7195824e4bb4ae7722 (diff) | |
download | mgaonline-8b8834e0de508e4bcb084790032ab87b76ac97e1.tar mgaonline-8b8834e0de508e4bcb084790032ab87b76ac97e1.tar.gz mgaonline-8b8834e0de508e4bcb084790032ab87b76ac97e1.tar.bz2 mgaonline-8b8834e0de508e4bcb084790032ab87b76ac97e1.tar.xz mgaonline-8b8834e0de508e4bcb084790032ab87b76ac97e1.zip |
- fix the capharnaum about x86_64, corpo, mnf etc
-rwxr-xr-x | mdkupdate | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -230,12 +230,16 @@ sub update_conf { } sub add_media { my $mirror = shift; - my ($r) = mdkonline::get_release(); - my $dist_type = mdkonline::get_distro_type(); + my ($r, $da, $is_x8664, $dist_name); + ($r) = mdkonline::get_release(); + # retrieve dist and arch from /etc/mandrakelinux file + $da = mdkonline::get_distro_type(); my $media_varfile = "/var/lib/urpmi/list.mdkupdate"; my ($path2new_arch, $path2new_synthesis) = $r <= 10.0 ? ('/RPMS/', '../base/synthesis.hdlist.cz') : ('/main_updates/', 'media_info/synthesis.hdlist.cz'); #sometimes server returns the full link http:// or ftp:// - my $fullpath2mir = if_($mirror !~ /^(http|ftp):\/\// , "ftp://") . $mirror . if_($dist_type, "/$dist_type") ."/$r" . $path2new_arch; + ($is_x8664) = $da->{arch} =~ /(x86_64)/; + $dist_name = $da->{name}; + my $fullpath2mir = if_($mirror !~ m!^(?:http|ftp)://! , "ftp://") . $mirror . if_($is_x8664, "/$is_x8664") . if_($dist_name, "/$dist_name") ."/$r" . $path2new_arch; eval { #Remove historical mdkupdate source -f $media_varfile and system "/usr/sbin/urpmi.removemedia", "mdkupdate"; |