summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-04-17 12:47:47 +0000
committerThierry Vignaud <tv@mandriva.org>2009-04-17 12:47:47 +0000
commit7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9 (patch)
tree2ab82b79ff2cc89043c333b181945581f43af588
parentafbfa9a4881a36b87ffba00f6b7df551ba2b7913 (diff)
downloaddrakx-7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9.tar
drakx-7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9.tar.gz
drakx-7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9.tar.bz2
drakx-7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9.tar.xz
drakx-7eb34c1ee66b8ce304eb74dea6b9b90482fc20a9.zip
do not reinvent do_pkgs->are_installed() and do_pkgs->are_available()
-rwxr-xr-xperl-install/standalone/harddrake27
1 files changed, 3 insertions, 4 deletions
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();