summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-03-07 11:08:46 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-03-07 11:08:46 +0000
commit676ea7c3f434917db5b9007467932a709a9055d4 (patch)
treecb63af7bd067067cb76576e7589d0a6ae749ff83
parent387e475d83ef68de7561aebd2f8a4332965b2be0 (diff)
downloadmgaonline-676ea7c3f434917db5b9007467932a709a9055d4.tar
mgaonline-676ea7c3f434917db5b9007467932a709a9055d4.tar.gz
mgaonline-676ea7c3f434917db5b9007467932a709a9055d4.tar.bz2
mgaonline-676ea7c3f434917db5b9007467932a709a9055d4.tar.xz
mgaonline-676ea7c3f434917db5b9007467932a709a9055d4.zip
- use urpmi.addmedia instead of gurpmi.addmedia because of the number
of dialogs - display a wait message while removing/adding media and computing dependancies
-rwxr-xr-xmdkupdate5
1 files changed, 4 insertions, 1 deletions
diff --git a/mdkupdate b/mdkupdate
index 91fe081f..df13e04e 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -150,6 +150,7 @@ You need to update to a newer version. You can get a new one from http://start.m
print Data::Dumper->Dump([ $bundle_info ], [ qw(bundle_info) ]);
if ($bundle_info->{status}) {
my @bundles;
+ my $w = $in->wait_message(N("Please wait"), N("Preparing..."));
my ($mirrors, $bundle) = ($bundle_info->{data}{mirrors}, $bundle_info->{data}{bundle});
my %mirrors = map { split(';', $_, 2) } @$mirrors;
add_media($_, $mirrors{$_}, 'media_info/hdlist.cz', '') foreach keys %mirrors;
@@ -161,8 +162,10 @@ You need to update to a newer version. You can get a new one from http://start.m
medias => [ keys %mirrors ],
});
} else {
+ undef $w;
$in->ask_warn(N("Error"), N("An error occurred") . "\n\n" . $bundle_info->{message});
}
+ undef $w;
}
sub ask_pkgs {
@@ -246,7 +249,7 @@ sub add_media {
my ($media_name, $mirror, $hdlist, $option) = @_;
eval {
system "/usr/sbin/urpmi.removemedia", $media_name;
- system "/usr/sbin/gurpmi.addmedia", '--silent-success', if_($option, $option), $media_name, $mirror, "with", $hdlist;
+ system "/usr/sbin/urpmi.addmedia", if_($option, $option), $media_name, $mirror, "with", $hdlist;
};
$@ and die "Problem adding bundle media with urpmi";
}