summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-02 01:03:30 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-02 01:03:30 +0000
commitcd1adc73ac19424c188ac9317e939181486a918c (patch)
treea777a86528c098579b607b8d41ad9da816f1f832 /mdkapplet
parent8e0bfa5437a84b163cf32a93ab69b8c4d34c00cf (diff)
downloadmgaonline-cd1adc73ac19424c188ac9317e939181486a918c.tar
mgaonline-cd1adc73ac19424c188ac9317e939181486a918c.tar.gz
mgaonline-cd1adc73ac19424c188ac9317e939181486a918c.tar.bz2
mgaonline-cd1adc73ac19424c188ac9317e939181486a918c.tar.xz
mgaonline-cd1adc73ac19424c188ac9317e939181486a918c.zip
(upgrade) fix removing media as user
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet14
1 files changed, 3 insertions, 11 deletions
diff --git a/mdkapplet b/mdkapplet
index a1604171..a276239d 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -354,18 +354,10 @@ sub upgrade() {
logIt(sprintf("locking urpmi database failed: %s"), $err);
return;
}
+ undef $_urpmi_lock;
- urpm::media::read_config($urpm);
- urpm::download::set_cmdline_proxy();
-
- my @entries = map { $_->{name} } @{$urpm->{media}};
- my @selected = urpm::media::select_media_by_name($urpm, \@entries, 1);
-
- if (@selected) {
- logIt("removing all existing urpmi media for upgrade");
- urpm::media::remove_media($urpm, \@selected);
- urpm::media::write_urpmi_cfg($urpm);
- }
+ logIt("removing all existing urpmi media for upgrade");
+ run_program::run('urpmi.removemedia', '-a');
logIt("adding urpmi media for new distribution");
my $product_type = lc($product_id->{type}); $product_type =~ s/\s//g;