summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2004-11-12 17:53:48 +0000
committerFrederic Lepied <flepied@mandriva.com>2004-11-12 17:53:48 +0000
commit4e2945586d496819b20e52fb9d92242e8c6abacc (patch)
treea8aadc773e40c0131750775c093d1cfaff7dedc4 /mdkupdate
parent16dfaadeb01034c3e448d7984ba9aef1609567fa (diff)
downloadmgaonline-4e2945586d496819b20e52fb9d92242e8c6abacc.tar
mgaonline-4e2945586d496819b20e52fb9d92242e8c6abacc.tar.gz
mgaonline-4e2945586d496819b20e52fb9d92242e8c6abacc.tar.bz2
mgaonline-4e2945586d496819b20e52fb9d92242e8c6abacc.tar.xz
mgaonline-4e2945586d496819b20e52fb9d92242e8c6abacc.zip
add support for new kind of directory layout (post 10.0)
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdkupdate b/mdkupdate
index 10b89a8f..e38af8e3 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -162,10 +162,11 @@ sub add_media {
my $mirror = shift;
my ($r) = mdkonline::get_release();
my $dist_type = mdkonline::get_distro_type();
- my $fullpath2mir = "ftp://" . $mirror . if_($dist_type, "/$dist_type") ."/$r" . "/RPMS" . "/";
+ my $fullpath2mir = $r <= 10.0 ? "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", "../base/synthesis.hdlist.cz";
+ system "/usr/sbin/urpmi.addmedia", "--update", "mdkupdate", $fullpath2mir, "with", $r <= 10.0 ? "../base/synthesis.hdlist.cz" : "media_info/synthesis.hdlist.cz";
};
$@ and die "Problem adding Update Media with urpmi";
}