summaryrefslogtreecommitdiffstats
path: root/perl-install/do_pkgs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-09-27 09:18:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-09-27 09:18:25 +0000
commit9566de4b8abcb5060f4ccc670233f704c6e55318 (patch)
tree805096583b886293dfbe647122c062e77cb087a0 /perl-install/do_pkgs.pm
parent671e44a9b0887755f478c50a7aa6b84afa1a1266 (diff)
downloaddrakx-backup-do-not-use-9566de4b8abcb5060f4ccc670233f704c6e55318.tar
drakx-backup-do-not-use-9566de4b8abcb5060f4ccc670233f704c6e55318.tar.gz
drakx-backup-do-not-use-9566de4b8abcb5060f4ccc670233f704c6e55318.tar.bz2
drakx-backup-do-not-use-9566de4b8abcb5060f4ccc670233f704c6e55318.tar.xz
drakx-backup-do-not-use-9566de4b8abcb5060f4ccc670233f704c6e55318.zip
get rid of "rpmq: no arguments given for query"
(eg: when calling ensure_are_installed with an empty list)
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r--perl-install/do_pkgs.pm2
1 files changed, 2 insertions, 0 deletions
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"