From 7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 17 Apr 2009 12:47:47 +0000 Subject: do not reinvent do_pkgs->are_installed() and do_pkgs->are_available() --- perl-install/standalone/harddrake2 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2 index 7a04c6231..1b0c26e95 100755 --- a/perl-install/standalone/harddrake2 +++ b/perl-install/standalone/harddrake2 @@ -515,10 +515,9 @@ $tree->signal_connect(realize => sub { $tree->get_selection->select_path(Gtk2::T #local $SIG{CHLD} = sub {}; if (my @packages = difference2([ pkgs::detect_hardware_packages($in->do_pkgs) ], [ qw(ati.2 dmraid gnome-alsamixer mdadm xmms-alsa) ])) { - @packages = grep { !$in->do_pkgs->is_installed($_) } @packages; - - # workarounding do_pkgs->is_available() destroying $_: - my (@packages2install) = (grep { $in->do_pkgs->is_available($_) } @packages); + @packages = difference2(\@packages, [ $in->do_pkgs->are_installed(@packages) ]); + # we use uniq() because on biarch machines, we got packages twice: + my @packages2install = uniq($in->do_pkgs->are_available(@packages)); undef $wait; gtkset_mousecursor_normal(); -- cgit v1.2.1