aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-24 16:49:25 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-24 16:49:25 +0000
commite0d8532e5fab8893dbd2be8339176e9789c06cb6 (patch)
tree089ec3ee923a6e816e28dd4f38a0446325927207
parentf1c0c197dcc2e3e93cc81287d5254e3bc105c90c (diff)
downloadrpmdrake-e0d8532e5fab8893dbd2be8339176e9789c06cb6.tar
rpmdrake-e0d8532e5fab8893dbd2be8339176e9789c06cb6.tar.gz
rpmdrake-e0d8532e5fab8893dbd2be8339176e9789c06cb6.tar.bz2
rpmdrake-e0d8532e5fab8893dbd2be8339176e9789c06cb6.tar.xz
rpmdrake-e0d8532e5fab8893dbd2be8339176e9789c06cb6.zip
In the Software Media Manager, the edition of media-specific proxies was
broken.
-rwxr-xr-xedit-urpm-sources.pl12
-rw-r--r--rpmdrake.pm4
2 files changed, 12 insertions, 4 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index 54c82ef2..7cfaf6fb 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -175,9 +175,11 @@ really want to replace it?"), yesno => 1) or return 0;
$urpm->select_media($i{name});
$urpm->remove_selected_media;
}
- add_medium_and_check($urpm,
- { probe_with => $probe, nolock => 1 },
- $i{name}, $make_url{$type}, $i{hdlist}, update => $type eq 'security');
+ add_medium_and_check(
+ $urpm,
+ { probe_with => $probe, nolock => 1 },
+ $i{name}, $make_url{$type}, $i{hdlist}, update => $type eq 'security',
+ );
return 1;
}
return 0;
@@ -251,9 +253,11 @@ sub edit_callback {
) or return 0
);
standalone::explanations("Removing medium $name");
+ my $saved_proxy = urpm::download::get_proxy($name);
+ undef $saved_proxy if !defined $saved_proxy->{http_proxy} && !defined $saved_proxy->{ftp_proxy};
$urpm->select_media($name);
$urpm->remove_selected_media;
- add_medium_and_check($urpm, { nolock => 1 }, $name, $url, $with_hdlist, update => $update);
+ add_medium_and_check($urpm, { nolock => 1, proxy => $saved_proxy }, $name, $url, $with_hdlist, update => $update);
return $name;
}
return undef;
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 590a28eb..f71e0858 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -23,6 +23,7 @@ package rpmdrake;
use lib qw(/usr/lib/libDrakX);
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
+use urpm::download ();
use MDK::Common;
use MDK::Common::System;
@@ -662,8 +663,11 @@ sub add_medium_and_check {
return 0;
}
+ urpm::download::set_proxy_config($_, $options->{proxy}{$_}, $_[0]) foreach keys %{$options->{proxy} || {}};
+
if (update_sources_check($urpm, $options, N_("Unable to add medium, errors reported:\n\n%s"), $_[0])) {
$urpm->write_config;
+ $options->{proxy} and urpm::download::dump_proxy_config();
} else {
$urpm->read_config;
return 0;