summaryrefslogtreecommitdiffstats
path: root/perl-install/do_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-31 11:04:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-31 11:04:19 +0000
commit68355635f23989f548a94a2f320374e4b4932bcb (patch)
tree466a635fd4446011a98b5106c9d7b897b2795a3a /perl-install/do_pkgs.pm
parent4a917239cdb07ad95602a5f3620c7bc0b4aa4635 (diff)
downloaddrakx-68355635f23989f548a94a2f320374e4b4932bcb.tar
drakx-68355635f23989f548a94a2f320374e4b4932bcb.tar.gz
drakx-68355635f23989f548a94a2f320374e4b4932bcb.tar.bz2
drakx-68355635f23989f548a94a2f320374e4b4932bcb.tar.xz
drakx-68355635f23989f548a94a2f320374e4b4932bcb.zip
- diskdrake --fileshare:
o do not ask to install nautilus-filesharing if already installed (#39544) the fix is to make ensure_is_installed behave like ensure_are_installed when no file is given
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r--perl-install/do_pkgs.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index a6e4c4a26..bc2196c3a 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -12,14 +12,18 @@ use common;
sub ensure_is_installed {
my ($do, $pkg, $o_file, $b_auto) = @_;
- if (! $o_file || ! -e "$::prefix$o_file") {
+ if ($o_file ? -e "$::prefix$o_file" : $do->is_installed($pkg)) {
+ return 1;
+ }
+
$do->in->ask_okcancel(N("Warning"), N("The package %s needs to be installed. Do you want to install it?", $pkg), 1)
or return if !$b_auto && $do->in;
+
if (!$do->install($pkg)) {
$do->in->ask_warn(N("Error"), N("Could not install the %s package!", $pkg)) if $do->in;
return;
}
- }
+
if ($o_file && ! -e "$::prefix$o_file") {
$do->in->ask_warn(N("Error"), N("Mandatory package %s is missing", $pkg)) if $do->in;
return;