From de1fcc27f943f4ae7b8ac4147a36b196c236619e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 15 Mar 2017 14:56:13 +0100 Subject: move fast path into is_installed() basically enabling it ti skip the rpmdb access like ensure_*() too. needed for next commit --- perl-install/do_pkgs.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'perl-install/do_pkgs.pm') 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) -- cgit v1.2.1