From 437db384617efd6241a83b50f1391c9b82f22105 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 18 Aug 2008 12:43:46 +0000 Subject: allow to use wildcard queries on installed packages --- perl-install/do_pkgs.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/do_pkgs.pm') diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index 37d92c9a8..1667d5cf5 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -257,8 +257,9 @@ sub are_installed { @l or return; my @l2; - run_program::run('/bin/rpm', '>', \@l2, '-q', '--qf', "%{name}\n", @l); #- do not care about the return value - intersection(\@l, [ chomp_(@l2) ]); #- can not return directly @l2 since it contains things like "package xxx is not installed" + my $query_all = (any { /\*/ } @l) ? 'a' : ''; + run_program::run('/bin/rpm', '>', \@l2, '-q' . $query_all, '--qf', "%{name}\n", @l); #- do not care about the return value + $query_all ? chomp_(@l2) : intersection(\@l, [ chomp_(@l2) ]); #- can not return directly @l2 since it contains things like "package xxx is not installed" } sub remove { -- cgit v1.2.1