diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-04 12:12:41 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-04 12:12:41 +0000 |
commit | 8e9f709c6fd99ead52a365c9d25575cdf1409af2 (patch) | |
tree | 94653ce515e5e44edb0dc89ef0a4384a0e1ee695 /perl-install/do_pkgs.pm | |
parent | b7cb1aba6d00719171b15f0715fac27027fdb6f8 (diff) | |
download | drakx-8e9f709c6fd99ead52a365c9d25575cdf1409af2.tar drakx-8e9f709c6fd99ead52a365c9d25575cdf1409af2.tar.gz drakx-8e9f709c6fd99ead52a365c9d25575cdf1409af2.tar.bz2 drakx-8e9f709c6fd99ead52a365c9d25575cdf1409af2.tar.xz drakx-8e9f709c6fd99ead52a365c9d25575cdf1409af2.zip |
(ensure_is_installed): file to test if the package is installed is optional.
But in that case, you have to check if it is installed first.
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r-- | perl-install/do_pkgs.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index 3bdfe7501..c8cf03b23 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -15,14 +15,14 @@ sub new { } sub ensure_is_installed { - my ($do, $pkg, $file, $b_auto) = @_; + my ($do, $pkg, $o_file, $b_auto) = @_; - if (! -e "$::prefix$file") { + 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); + $do->install($pkg) or return; } - if (! -e "$::prefix$file") { + if ($o_file && ! -e "$::prefix$o_file") { $do->{in}->ask_warn('', N("Mandatory package %s is missing", $pkg)); return; } |