summaryrefslogtreecommitdiffstats
path: root/perl-install/do_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-08 00:41:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-08 00:41:59 +0000
commit909309f431897fa7a6601d58a45590157323d2e1 (patch)
treee59fd497df5da78c640c3de017f850f3570ee138 /perl-install/do_pkgs.pm
parent2bda801375131eadb2c2b24546f42cef39d14ec9 (diff)
downloaddrakx-909309f431897fa7a6601d58a45590157323d2e1.tar
drakx-909309f431897fa7a6601d58a45590157323d2e1.tar.gz
drakx-909309f431897fa7a6601d58a45590157323d2e1.tar.bz2
drakx-909309f431897fa7a6601d58a45590157323d2e1.tar.xz
drakx-909309f431897fa7a6601d58a45590157323d2e1.zip
it's better to warn package installation failure in ensure_is_installed than each callers (bugzilla #17251)
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r--perl-install/do_pkgs.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index f8ed44028..f155a5c84 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -15,7 +15,10 @@ sub ensure_is_installed {
if (! $o_file || ! -e "$::prefix$o_file") {
$do->in->ask_okcancel('', N("The package %s needs to be installed. Do you want to install it?", $pkg), 1)
or return if !$b_auto;
- $do->install($pkg) or return;
+ if (!$do->install($pkg)) {
+ $do->in->ask_warn(N("Error"), N("Could not install the %s package!", $pkg));
+ return;
+ }
}
if ($o_file && ! -e "$::prefix$o_file") {
$do->in->ask_warn('', N("Mandatory package %s is missing", $pkg));
@@ -30,7 +33,10 @@ sub ensure_binary_is_installed {
if (!whereis_binary($binary, $::prefix)) {
$do->in->ask_okcancel('', N("The package %s needs to be installed. Do you want to install it?", $pkg), 1)
or return if !$b_auto;
- $do->install($pkg) or return;
+ if (!$do->install($pkg)) {
+ $do->in->ask_warn(N("Error"), N("Could not install the %s package!", $pkg));
+ return;
+ }
}
if (!whereis_binary($binary, $::prefix)) {
$do->in->ask_warn('', N("Mandatory package %s is missing", $pkg));