summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-08-18 16:02:07 +0000
committerOlivier Blin <oblin@mandriva.com>2008-08-18 16:02:07 +0000
commit428df4969f030ef7f3d3df744eaa3d9510c80879 (patch)
tree51eb04e620763208baf3077ee6c40a5cce53b240 /perl-install/pkgs.pm
parente9ca401d4091b43245096a088043ef7e4ff50196 (diff)
downloaddrakx-428df4969f030ef7f3d3df744eaa3d9510c80879.tar
drakx-428df4969f030ef7f3d3df744eaa3d9510c80879.tar.gz
drakx-428df4969f030ef7f3d3df744eaa3d9510c80879.tar.bz2
drakx-428df4969f030ef7f3d3df744eaa3d9510c80879.tar.xz
drakx-428df4969f030ef7f3d3df744eaa3d9510c80879.zip
split graphical and network packages detection code
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 6d795f4e5..c4dcac27a 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -152,17 +152,21 @@ sub list_hardware_packages {
grep { !/openoffice/ } simple_read_rpmsrate($o_match_all_hardware);
}
-sub detect_hardware_packages {
+sub detect_graphical_drivers {
my ($do_pkgs, $o_match_all_hardware) = @_;
- my @l;
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);
- push @l, map { Xconfig::proprietary::pkgs_for_Driver2($_, $do_pkgs) } @drivers;
+ map { Xconfig::proprietary::pkgs_for_Driver2($_, $do_pkgs) } @drivers;
+}
+sub detect_network_drivers {
+ my ($do_pkgs, $o_match_all_hardware) = @_;
require network::connection;
require network::thirdparty;
+
+ my @l;
foreach my $type (network::connection->get_types) {
$type->can('get_thirdparty_settings') or next;
foreach my $settings (@{$type->get_thirdparty_settings || []}) {
@@ -175,4 +179,12 @@ sub detect_hardware_packages {
@l;
}
+sub detect_hardware_packages {
+ my ($do_pkgs, $o_match_all_hardware) = @_;
+ (
+ detect_graphical_drivers($do_pkgs, $o_match_all_hardware),
+ detect_network_drivers($do_pkgs, $o_match_all_hardware),
+ );
+}
+
1;