summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2004-12-08 18:21:43 +0000
committerDaouda Lo <daouda@mandriva.com>2004-12-08 18:21:43 +0000
commit16074295271dbfc1b0ef06e75a67715231289e70 (patch)
tree7453fe5fb89584b82d591f56462dee828c2163da /mdkupdate
parenta4168e1faecd47e877e17217afc3716c780a598d (diff)
downloadmgaonline-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-xmdkupdate6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdkupdate b/mdkupdate
index fc00fa20..55d1521e 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -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";