From 020fc5df149376932aeab1037b12cd2b70fa305b Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Wed, 9 Nov 2005 12:46:44 +0000 Subject: Show proper error message when gurpmi cannot find an rpm file --- gurpmi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gurpmi b/gurpmi index dfafff94..57420ad4 100644 --- a/gurpmi +++ b/gurpmi @@ -38,7 +38,14 @@ sub all_descriptions { } foreach (@all_rpms) { - warn "$_"; + unless (-e $_) { + $mainbox->pack_start(new_label(N("Error: unable to find file %s, will cancel operation", $_)), 1, 1, 0); + my $abort_button = Gtk2::Button->new(but(N("_Ok"))); + $abort_button->signal_connect(clicked => sub { quit(); exit 1 }); + add_button_box($mainbox, $abort_button); + $mainw->show_all; + Gtk2->main; + } /\.src\.rpm$/ ? push(@$srpms, $_) : push(@$rpms, $_); } -- cgit v1.2.1