summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm.pm6
-rw-r--r--urpm/download.pm5
2 files changed, 10 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 5510158c..65e1332c 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -781,6 +781,9 @@ sub remove_selected_media {
"$_->{name}.cache") {
$_ and unlink "$urpm->{statedir}/$_";
}
+
+ #- remove proxy settings for this media
+ urpm::download::remove_proxy_media($_->{name});
} else {
push @result, $_; #- not removed so keep it
}
@@ -1776,8 +1779,9 @@ this could happen if you mounted manually the directory when creating the medium
}
}
- #- this file is written in any cases.
+ #- write config files in any case
$urpm->write_config;
+ dump_proxy_config();
}
#- make sure names files are regenerated.
diff --git a/urpm/download.pm b/urpm/download.pm
index b0e7b01d..3df420fc 100644
--- a/urpm/download.pm
+++ b/urpm/download.pm
@@ -63,6 +63,11 @@ sub dump_proxy_config () {
return 1;
}
+#- deletes the proxy configuration for the specified media
+sub remove_proxy_media {
+ defined $proxy_config and delete $proxy_config->{$_[0] || ''};
+}
+
#- reads and loads the proxy.cfg file ;
#- returns the global proxy settings (without arguments) or the
#- proxy settings for the specified media (with a media name as argument)