summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2006-06-10 02:11:18 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2006-06-10 02:11:18 +0000
commit99c59fd0f670418b96b90d44a07c6cfa4cef5d66 (patch)
treeaef5b12e205ef6a0a70cb327a739180788e654ae /urpmi.addmedia
parent68f62051f4b03410b931b1846b1cbe3fd9e86587 (diff)
downloadurpmi-99c59fd0f670418b96b90d44a07c6cfa4cef5d66.tar
urpmi-99c59fd0f670418b96b90d44a07c6cfa4cef5d66.tar.gz
urpmi-99c59fd0f670418b96b90d44a07c6cfa4cef5d66.tar.bz2
urpmi-99c59fd0f670418b96b90d44a07c6cfa4cef5d66.tar.xz
urpmi-99c59fd0f670418b96b90d44a07c6cfa4cef5d66.zip
- make urpmi.addmedia asking media by media if they should be installed
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}});