summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-08-18 16:03:35 +0000
committerOlivier Blin <oblin@mandriva.com>2008-08-18 16:03:35 +0000
commit4327ddc54a6420a83f950d0dc86d95fa8aea3b3c (patch)
tree3b4102be164d944b24c368679002b3dbbe2f4463 /perl-install/pkgs.pm
parent8f15f12e023718174b6aa70be7ffb4e4c3f25b8c (diff)
downloaddrakx-4327ddc54a6420a83f950d0dc86d95fa8aea3b3c.tar
drakx-4327ddc54a6420a83f950d0dc86d95fa8aea3b3c.tar.gz
drakx-4327ddc54a6420a83f950d0dc86d95fa8aea3b3c.tar.bz2
drakx-4327ddc54a6420a83f950d0dc86d95fa8aea3b3c.tar.xz
drakx-4327ddc54a6420a83f950d0dc86d95fa8aea3b3c.zip
allow to detect graphical drivers for running system (when not maching all hardware)
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm12
1 files 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;
}