From 9566de4b8abcb5060f4ccc670233f704c6e55318 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Sep 2005 09:18:25 +0000 Subject: get rid of "rpmq: no arguments given for query" (eg: when calling ensure_are_installed with an empty list) --- perl-install/do_pkgs.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perl-install/do_pkgs.pm') diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index c98019062..4d1464bc2 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -237,6 +237,8 @@ sub is_installed { sub are_installed { my ($_do, @l) = @_; + @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" -- cgit v1.2.1