diff options
author | Daouda Lo <daouda@mandriva.com> | 2004-12-08 18:21:43 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2004-12-08 18:21:43 +0000 |
commit | 16074295271dbfc1b0ef06e75a67715231289e70 (patch) | |
tree | 7453fe5fb89584b82d591f56462dee828c2163da /mdkupdate | |
parent | a4168e1faecd47e877e17217afc3716c780a598d (diff) | |
download | mgaonline-16074295271dbfc1b0ef06e75a67715231289e70.tar mgaonline-16074295271dbfc1b0ef06e75a67715231289e70.tar.gz mgaonline-16074295271dbfc1b0ef06e75a67715231289e70.tar.bz2 mgaonline-16074295271dbfc1b0ef06e75a67715231289e70.tar.xz mgaonline-16074295271dbfc1b0ef06e75a67715231289e70.zip |
- don't append protocol when url name is fully qualified (for corporate)
- better user_agent for server side apps to handle different products (corporate, MNF)
- fixed empty message when update are done
Diffstat (limited to 'mdkupdate')
-rwxr-xr-x | mdkupdate | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -165,8 +165,10 @@ sub add_media { my $mirror = shift; my ($r) = mdkonline::get_release(); my $dist_type = mdkonline::get_distro_type(); - my $fullpath2mir = $r <= 10.0 ? "ftp://" . $mirror . if_($dist_type, "/$dist_type") ."/$r" . "/RPMS" . "/" : - "ftp://" . $mirror . "/$r" . "/main_updates" . "/"; + #sometimes server returns the full link http:// or ftp:// + my $no_full_path = $mirror !~ |^(http|ftp)://|; + my $fullpath2mir = $r <= 10.0 ? if_($no_full_path, "ftp://") . $mirror . if_($dist_type, "/$dist_type") ."/$r" . "/RPMS" . "/" : + "ftp://" . $mirror . "/$r" . "/main_updates" . "/"; eval { system "/usr/sbin/urpmi.removemedia", "mdkupdate"; system "/usr/sbin/urpmi.addmedia", "--update", "mdkupdate", $fullpath2mir, "with", $r <= 10.0 ? "../base/synthesis.hdlist.cz" : "media_info/synthesis.hdlist.cz"; |