diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-09 11:38:28 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-09 11:38:28 +0000 |
commit | e17430da148f6d62afa65d385d738f7b16cf1c35 (patch) | |
tree | bc300a4142e77b62825916f811f52142957c12d7 | |
parent | 6c907bc4a8fa24ba66b521b7f55c368f9dbfa5b2 (diff) | |
download | mgaonline-e17430da148f6d62afa65d385d738f7b16cf1c35.tar mgaonline-e17430da148f6d62afa65d385d738f7b16cf1c35.tar.gz mgaonline-e17430da148f6d62afa65d385d738f7b16cf1c35.tar.bz2 mgaonline-e17430da148f6d62afa65d385d738f7b16cf1c35.tar.xz mgaonline-e17430da148f6d62afa65d385d738f7b16cf1c35.zip |
do not check again if updates really are availlables when run from the applet
-rwxr-xr-x | mdkupdate | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -109,6 +109,12 @@ my $wc = mdkonline::read_conf(); if (!$bundle) { if ($wc->{HOST_ID} && $wc->{HOST_KEY}) { my $getupdates; + my ($release) = mdkonline::get_release(); + if ($applet) { + 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; + } $getupdates = mdkonline::soap_get_updates_for_host($wc->{HOST_ID}, $wc->{HOST_KEY}); my $ret = mdkonline::check_server_response($getupdates); @@ -122,12 +128,7 @@ if (!$bundle) { my $pkgs = [ map { $_->{filename} } @$updates ]; print Data::Dumper->Dump([ $updates, $pkgs], [ qw(updates pkgs) ]); - my ($release) = mdkonline::get_release(); - if ($applet) { - 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=$mirror"; - } elsif ($auto) { # FIXME + if ($auto) { # FIXME my $ret = update_pkgs(@$pkgs); $ret == 1 or output_p($logfile, "[mdkupdate] Error 100: Packages failed to upgrade"); } else { |