diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-20 19:47:44 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-20 19:47:44 +0000 |
commit | 884c1665b0ae7476ae8ff5c1cfd2cac4918b273a (patch) | |
tree | ac10fe1f9a707844a72666dd124fe6bbdcbf6b45 | |
parent | f46b418a8e5694af45ed61d77d9b2af92a1193a1 (diff) | |
download | mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar.gz mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar.bz2 mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar.xz mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.zip |
enable to operate offline
-rwxr-xr-x | mdkupdate | 32 |
1 files changed, 2 insertions, 30 deletions
@@ -106,40 +106,12 @@ my $wc = mdkonline::read_conf(); if (!$bundle) { my ($release) = mdkonline::get_release(); - if ($wc->{HOST_ID} && $wc->{HOST_KEY}) { - my $getupdates; - $getupdates = mdkonline::soap_get_updates_for_host($wc->{HOST_ID}, $wc->{HOST_KEY}); - - my $ret = mdkonline::check_server_response($getupdates); - print Data::Dumper->Dump([ $getupdates ], [ qw(getupdates) ]); - if ($ret eq 'OK') { - # doble check mdkapplet: - if (my $updates = $getupdates->{data}{updates}) { # there're updates - - my %mirrors = add_mirrors($in, undef, $getupdates->{data}{mirrors}, {}, '--update'); - my $mirror = find { $_ } keys %mirrors; # pick a random mirror - my $pkgs = [ map { $_->{filename} } @$updates ]; - print Data::Dumper->Dump([ $updates, $pkgs], [ qw(updates pkgs) ]); - - if ($auto) { # FIXME - my $ret = update_pkgs(@$pkgs); + + my $ret = update_pkgs(); $ret == 1 or output_p($logfile, "[mdkupdate] Error 100: Packages failed to upgrade"); - } rpm_qa($afterrpm); my $wc = mdkonline::read_conf(); - my $need_upload = get_rpm_diff(); - if ($need_upload || $auto || $mnf) { - #- send configuration and get back key to use... - $result = mdkonline::prepare_upload_conf($wc); - } clean_dir(); - } - } else { - log::explanations("geting updates failed: $ret"); - } - } else { # no HOST_ID - - } } else { log::explanations("managing the $bundle bundle"); if (-d '/live/media/loopbacks') { |