summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia9
1 files changed, 9 insertions, 0 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index 20f44298..24e8bd46 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -130,6 +130,15 @@ if ($options{distrib}) {
update => $options{update},
probe_with => $options{probe_with},
nolock => $options{nolock},
+ ask_media => sub {
+ my ($medianame, $default) = @_;
+ my $yesexpr = N("Yy");
+ my $answer = message_input(
+ N("\nDo you want to add media '%s'", $medianame) . ($default ? N(" (Y/n) ") : N(" (y/N) ")),
+ undef, boolean => 1
+ );
+ return($answer ? $answer =~ /[$yesexpr]/ : $default);
+ },
);
local $SIG{INT} = sub {
remove_failed($urpm, grep { $_->{modified} } @{$urpm->{media}});