summaryrefslogtreecommitdiffstats
path: root/gurpmi
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-09 12:46:44 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-11-09 12:46:44 +0000
commit020fc5df149376932aeab1037b12cd2b70fa305b (patch)
treee69e6d73e32b1fa67b9b6b362f3050e88878d83c /gurpmi
parent6cf4b382b54a0172dd55eaaa3862ae220860b7d1 (diff)
downloadurpmi-020fc5df149376932aeab1037b12cd2b70fa305b.tar
urpmi-020fc5df149376932aeab1037b12cd2b70fa305b.tar.gz
urpmi-020fc5df149376932aeab1037b12cd2b70fa305b.tar.bz2
urpmi-020fc5df149376932aeab1037b12cd2b70fa305b.tar.xz
urpmi-020fc5df149376932aeab1037b12cd2b70fa305b.zip
Show proper error message when gurpmi cannot find an rpm file
Diffstat (limited to 'gurpmi')
-rw-r--r--gurpmi9
1 files changed, 8 insertions, 1 deletions
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, $_);
}