aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-01 13:30:25 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-01 13:30:25 +0000
commit69d7be08c731b3b03e15986515292e89e2a5f78a (patch)
tree98c47a0a345d06c49aec17404fe9c11da7164666 /rpmdrake.pm
parent0ed586338bb7d7565d79fbed611235d166c80595 (diff)
downloadrpmdrake-69d7be08c731b3b03e15986515292e89e2a5f78a.tar
rpmdrake-69d7be08c731b3b03e15986515292e89e2a5f78a.tar.gz
rpmdrake-69d7be08c731b3b03e15986515292e89e2a5f78a.tar.bz2
rpmdrake-69d7be08c731b3b03e15986515292e89e2a5f78a.tar.xz
rpmdrake-69d7be08c731b3b03e15986515292e89e2a5f78a.zip
(warn_for_network_need) split it out of choose_mirror() (needed for
next commits)
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm14
1 files changed, 10 insertions, 4 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 27129837..958526ad 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -86,6 +86,7 @@ our @EXPORT = qw(
update_sources_interactive
update_sources_noninteractive
wait_msg
+ warn_for_network_need
writeconf
);
our $typical_width = 280;
@@ -578,9 +579,9 @@ sub mirrors {
return sort { $b->{goodness} <=> $a->{goodness} } @mirrors;
}
-sub choose_mirror {
- my ($urpm, %options) = @_;
- my $message = $options{message} ? $options{message} :
+sub warn_for_network_need {
+ my ($message, %options) = @_;
+ $message ||=
$branded
? N("I need to access internet to get the mirror list.
Please check that your network is currently running.
@@ -590,9 +591,14 @@ Is it ok to continue?")
Please check that your network is currently running.
Is it ok to continue?");
+ interactive_msg(N("Mirror choice"), $message, yesno => 1, %options) or return '';
+}
+
+sub choose_mirror {
+ my ($urpm, %options) = @_;
delete $options{message};
my @transient_options = exists $options{transient} ? (transient => $options{transient}) : ();
- interactive_msg(N("Mirror choice"), $message, yesno => 1, %options) or return '';
+ warn_for_network_need($options{message}, %options);
my @mirrors = eval { mirrors($urpm, $options{want_base_distro}) };
my $error = $@;
if ($error) {