aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-16 09:08:01 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-16 09:08:01 +0000
commitd89b3c317ce6a91f63b432b48a232afdf86e7789 (patch)
tree41bed7fb520bb22456af239c2df8798dff3c497f
parentbb3ddba44f90d931b74545df4afe41ece653b55f (diff)
downloadrpmdrake-d89b3c317ce6a91f63b432b48a232afdf86e7789.tar
rpmdrake-d89b3c317ce6a91f63b432b48a232afdf86e7789.tar.gz
rpmdrake-d89b3c317ce6a91f63b432b48a232afdf86e7789.tar.bz2
rpmdrake-d89b3c317ce6a91f63b432b48a232afdf86e7789.tar.xz
rpmdrake-d89b3c317ce6a91f63b432b48a232afdf86e7789.zip
- fix not finding grpmi in sudo mode
- fix unclickable "not finding grpmi" dialog
-rwxr-xr-xrpmdrake11
1 files changed, 6 insertions, 5 deletions
diff --git a/rpmdrake b/rpmdrake
index 329abc01..9a4dae65 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -874,6 +874,10 @@ sub dialog_rpmnew {
sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-(
my ($urpm) = @_;
+ my $grpmi = '/usr/sbin/grpmi';
+ -x $grpmi or fatal_msg(_("Program missing"),
+ _("A required program is missing (grpmi). Check your installation.")), myexit(-1);
+
my $fatal_msg;
local $urpm->{fatal} = sub { $fatal_msg = $_[1]; die };
@@ -916,11 +920,8 @@ eval {
my_gtk::flush();
}
} else {
- exec('grpmi', if_($options{'no-verify-rpm'}, '--no-verify-rpm'),
- (map { ("-noupgrade", $_) } @rpms_install),
- @rpms_upgrade)
- or fatal_msg(_("Program missing"),
- _("A required program is missing (grpmi). Check your installation.")), myexit(-1);
+ exec($grpmi, if_($options{'no-verify-rpm'}, '--no-verify-rpm'), (map { ("-noupgrade", $_) } @rpms_install), @rpms_upgrade)
+ or print(STDERR " *** ERROR *** Could not exec $grpmi.\n"), c::_exit(-1);
}
my $exitstatus = $?;
my %pkg2rpmnew;