summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2005-10-13 21:55:46 +0000
committerDaouda Lo <daouda@mandriva.com>2005-10-13 21:55:46 +0000
commit672c7e2b47172c2b70fe18399c78d15f15318bf5 (patch)
tree76406cb8cbc5cdd82739fa8295d605188afac9b8 /mdkupdate
parentc580f2c3cc215257f25cb6c5cf8856db8d1ae7f3 (diff)
downloadmgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar
mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar.gz
mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar.bz2
mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.tar.xz
mgaonline-672c7e2b47172c2b70fe18399c78d15f15318bf5.zip
- clean manage the name change
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate8
1 files changed, 3 insertions, 5 deletions
diff --git a/mdkupdate b/mdkupdate
index 528c5469..c8d7d9cd 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -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);