summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-09 11:38:28 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-09 11:38:28 +0000
commite17430da148f6d62afa65d385d738f7b16cf1c35 (patch)
treebc300a4142e77b62825916f811f52142957c12d7 /mdkupdate
parent6c907bc4a8fa24ba66b521b7f55c368f9dbfa5b2 (diff)
downloadmgaonline-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
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate13
1 files changed, 7 insertions, 6 deletions
diff --git a/mdkupdate b/mdkupdate
index 2171aa35..3b00c29f 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -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 {