From 4327ddc54a6420a83f950d0dc86d95fa8aea3b3c Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 18 Aug 2008 16:03:35 +0000 Subject: allow to detect graphical drivers for running system (when not maching all hardware) --- perl-install/pkgs.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index c4dcac27a..02fbf8293 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -156,8 +156,16 @@ sub detect_graphical_drivers { my ($do_pkgs, $o_match_all_hardware) = @_; require Xconfig::card; require Xconfig::proprietary; - my $cards = Xconfig::card::readCardsDB("$ENV{SHARE_PATH}/ldetect-lst/Cards+"); - my @drivers = grep { $_ } uniq(map { $_->{Driver2} } values %$cards); + + my @cards; + if ($o_match_all_hardware) { + my $all_cards = Xconfig::card::readCardsDB("$ENV{SHARE_PATH}/ldetect-lst/Cards+"); + @cards = values %$all_cards; + } else { + @cards = Xconfig::card::probe(); + } + + my @drivers = grep { $_ } uniq(map { $_->{Driver2} } @cards); map { Xconfig::proprietary::pkgs_for_Driver2($_, $do_pkgs) } @drivers; } -- cgit v1.2.1