diff options
author | Daouda Lo <daouda@mandriva.com> | 2005-10-13 21:55:46 +0000 |
---|---|---|
committer | Daouda Lo <daouda@mandriva.com> | 2005-10-13 21:55:46 +0000 |
commit | 672c7e2b47172c2b70fe18399c78d15f15318bf5 (patch) | |
tree | 76406cb8cbc5cdd82739fa8295d605188afac9b8 | |
parent | c580f2c3cc215257f25cb6c5cf8856db8d1ae7f3 (diff) | |
download | mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar.gz mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar.bz2 mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar.xz mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.zip |
- clean manage the name change
-rwxr-xr-x | mdkupdate | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -103,11 +103,9 @@ if ($o{LOGIN} && $o{PASS} && $o{LOGIN} !~ /\s+/ && $o{PASS} !~ /\s+/) { #printf "SCHEDULED = $scheduled\nNOSCHEDULED = $noscheduled\n"; -f $currentrpm or rpm_qa($currentrpm); if ($opt eq '--applet') { - if ($release <= 10.1) { - system "/usr/bin/MandrivaUpdate", "--no-confirmation", "--media=update_source", "--pkg-sel=$scheduled", "--pkg-nosel=$noscheduled"; - } else { - system "/usr/bin/MandrivaUpdate", "--no-confirmation", "--no-media-update", "--media=update_source", "--pkg-sel=$scheduled", "--pkg-nosel=$noscheduled"; - } + my $rpm_exec_name = $release >= 2006.0 ? "/usr/bin/MandrivaUpdate" : "/usr/bin/MandrakeUpdate"; + my $is_no_media_update = $release <= 10.1 ? "--no-media-update" : ''; + system $rpm_exec_name, "--no-confirmation", $is_no_media_update, "--media=update_source", "--pkg-sel=$scheduled", "--pkg-nosel=$noscheduled"; } elsif ($opt eq '--noX') { my $in = interactive->vnew; my $pkgs = ask_pkgs($in); |