From 5172e1a46444f54abcced42478bf5af17e48215b Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 24 Jan 2005 18:38:56 +0000 Subject: urpmi --gui will now ask with a GUI popup to change media. Intended to be used with --auto (so other annoying dialogs are not shown) --- urpm/args.pm | 1 + urpmi | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/urpm/args.pm b/urpm/args.pm index 74e93a4a..f953ce88 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -58,6 +58,7 @@ my %options_spec = ( 'synthesis=s' => \$::synthesis, auto => sub { $urpm->{options}{auto} = 1 }, 'allow-medium-change' => \$::allow_medium_change, + 'gui' => \$::gui, 'auto-select' => \$::auto_select, 'no-remove|no-uninstall' => \$::no_remove, keep => sub { $urpm->{options}{keep} = 1 }, diff --git a/urpmi b/urpmi index 4b767ffc..d10a49c2 100755 --- a/urpmi +++ b/urpmi @@ -487,7 +487,16 @@ $urpm->copy_packages_of_removable_media( ask_for_medium => (!$urpm->{options}{auto} || $allow_medium_change) && sub { my $msg = N("Please insert the medium named \"%s\" on device [%s]", $_[0], $_[1]); my $msg2 = N("Press Enter when ready..."); - defined message_input("$msg\n$msg2 "); + if (our $gui) { + #- probably run from a drak tool + my $gmessage = find { -x $_ } '/usr/X11R6/bin/gmessage', '/usr/bin/gmessage'; + if ($gmessage) { + my $m = to_utf8("\n$msg\n\n$msg2"); + system($gmessage, $m); + return 1; + } + } + return defined message_input("$msg\n$msg2 "); }, ); -- cgit v1.2.1