summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-04-03 15:43:55 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-04-03 15:43:55 +0000
commit932a3fcf735df7a05426c36825159b65e2ff8a62 (patch)
tree23666938ae283c0001579d7204be0a1f812b9e2b
parent093502ca87a557a9da8d1138eb09c0c88725bb5c (diff)
downloadmgaonline-932a3fcf735df7a05426c36825159b65e2ff8a62.tar
mgaonline-932a3fcf735df7a05426c36825159b65e2ff8a62.tar.gz
mgaonline-932a3fcf735df7a05426c36825159b65e2ff8a62.tar.bz2
mgaonline-932a3fcf735df7a05426c36825159b65e2ff8a62.tar.xz
mgaonline-932a3fcf735df7a05426c36825159b65e2ff8a62.zip
make legacy updates work (and inline auto_install_rpms() btw)
-rwxr-xr-xmdkupdate15
1 files changed, 4 insertions, 11 deletions
diff --git a/mdkupdate b/mdkupdate
index d981ebc0..3bf6eaae 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -129,10 +129,11 @@ if (!$bundle) {
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
- auto_install_rpms();
+ my $ret = update_pkgs(@$pkgs);
+ $ret == 1 or output_p($logfile, "[mdkupdate] Error 100: Packages failed to upgrade");
} else {
- my $pkgs = ask_pkgs($in);
- install_pkgs($in, $pkgs, $mirror, { no_X => $noX });
+ $pkgs = ask_pkgs($in) if !$auto;
+ install_pkgs($in, $pkgs, $mirror, { no_X => $noX || $auto });
$in->exit(0);
}
rpm_qa($afterrpm);
@@ -293,14 +294,6 @@ sub my_fullname {
"$name-$version-$release";
}
-sub auto_install_rpms {
- my ($pkgs) = shift;
- my @pkg;
- push(@pkg, $_ . '.rpm') foreach @$pkgs;
- my $ret = update_pkgs(@pkg);
- $ret == 1 or output_p($logfile, "[mdkupdate] Error 100: Packages failed to upgrade");
-}
-
sub add_media {
my ($media_name, $mirror, $hdlist, $option) = @_;
log::explanations("removing/adding the media $media_name");