diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-03-31 11:04:19 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-03-31 11:04:19 +0000 |
commit | 68355635f23989f548a94a2f320374e4b4932bcb (patch) | |
tree | 466a635fd4446011a98b5106c9d7b897b2795a3a /perl-install | |
parent | 4a917239cdb07ad95602a5f3620c7bc0b4aa4635 (diff) | |
download | drakx-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')
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/do_pkgs.pm | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 7c076e190..74e240396 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -2,6 +2,8 @@ o fix crash while removing an item (#34413) - harddrake: o offer again to run drakxtv for TV cards (#39609) +- diskdrake --fileshare: + o do not ask to install nautilus-filesharing if already installed (#39544) Version 10.22 - 27 March 2008 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; |