summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-20 19:47:44 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-20 19:47:44 +0000
commit884c1665b0ae7476ae8ff5c1cfd2cac4918b273a (patch)
treeac10fe1f9a707844a72666dd124fe6bbdcbf6b45
parentf46b418a8e5694af45ed61d77d9b2af92a1193a1 (diff)
downloadmgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar
mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar.gz
mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar.bz2
mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.tar.xz
mgaonline-884c1665b0ae7476ae8ff5c1cfd2cac4918b273a.zip
enable to operate offline
-rwxr-xr-xmdkupdate32
1 files changed, 2 insertions, 30 deletions
diff --git a/mdkupdate b/mdkupdate
index 81809037..acd0752a 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -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') {