summaryrefslogtreecommitdiffstats
path: root/perl-install/do_pkgs.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2017-03-15 14:56:13 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2017-03-17 02:13:58 +0100
commitde1fcc27f943f4ae7b8ac4147a36b196c236619e (patch)
tree134febafda1bb39e39e0dd2100c22cff4308b422 /perl-install/do_pkgs.pm
parent61f77780149c2a63c39abfbc9216358661eceeff (diff)
downloaddrakx-de1fcc27f943f4ae7b8ac4147a36b196c236619e.tar
drakx-de1fcc27f943f4ae7b8ac4147a36b196c236619e.tar.gz
drakx-de1fcc27f943f4ae7b8ac4147a36b196c236619e.tar.bz2
drakx-de1fcc27f943f4ae7b8ac4147a36b196c236619e.tar.xz
drakx-de1fcc27f943f4ae7b8ac4147a36b196c236619e.zip
move fast path into is_installed()
basically enabling it ti skip the rpmdb access like ensure_*() too. needed for next commit
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r--perl-install/do_pkgs.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm
index dae13aba8..44f2e3ada 100644
--- a/perl-install/do_pkgs.pm
+++ b/perl-install/do_pkgs.pm
@@ -38,7 +38,7 @@ If $b_auto is set, (g)urpmi will not ask any questions.
sub ensure_is_installed {
my ($do, $pkg, $o_file, $b_auto) = @_;
- if ($o_file ? -e "$::prefix$o_file" : $do->is_installed($pkg)) {
+ if ($do->is_installed($pkg)) {
return 1;
}
@@ -187,8 +187,8 @@ This is less costly (needs to query RPM DB)
=cut
sub is_installed {
- my ($do, $name) = @_;
- $do->are_installed($name);
+ my ($do, $name, $o_file) = @_;
+ $o_file ? -e "$::prefix$o_file" : $do->are_installed($name);
}
=item check_kernel_module_packages($do, $base_name)