diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-08-18 12:43:46 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-08-18 12:43:46 +0000 |
commit | 437db384617efd6241a83b50f1391c9b82f22105 (patch) | |
tree | 56075f7f36a67784fe3415ffd13971fe42f33b95 /perl-install | |
parent | 69c93ea447ae5d1486addeab562c11d99a4bfeae (diff) | |
download | drakx-437db384617efd6241a83b50f1391c9b82f22105.tar drakx-437db384617efd6241a83b50f1391c9b82f22105.tar.gz drakx-437db384617efd6241a83b50f1391c9b82f22105.tar.bz2 drakx-437db384617efd6241a83b50f1391c9b82f22105.tar.xz drakx-437db384617efd6241a83b50f1391c9b82f22105.zip |
allow to use wildcard queries on installed packages
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/do_pkgs.pm | 5 |
1 files changed, 3 insertions, 2 deletions
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 { |