summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-27 08:09:57 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-27 08:09:57 +0000
commit6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab (patch)
tree23df90df1d2b45befe8d62f5f452399d2a79f394 /perl-install
parent2e7bec9cf05c2ad1d747260087aab55f00656915 (diff)
downloaddrakx-backup-do-not-use-6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab.tar
drakx-backup-do-not-use-6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab.tar.gz
drakx-backup-do-not-use-6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab.tar.bz2
drakx-backup-do-not-use-6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab.tar.xz
drakx-backup-do-not-use-6c9e831de8a374dbbd7a0fdfbf137b8f3fc064ab.zip
add __regexp suffix to matching_desc() and matching_driver()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm3
-rw-r--r--perl-install/bootloader.pm2
-rw-r--r--perl-install/common.pm2
-rw-r--r--perl-install/detect_devices.pm14
-rw-r--r--perl-install/install_any.pm28
-rw-r--r--perl-install/install_steps.pm30
-rw-r--r--perl-install/pkgs.pm4
7 files changed, 42 insertions, 41 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 25e3cd0c0..608146b9e 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -75,7 +75,7 @@ sub default_ATI_fglrx_config() { our $default_ATI_fglrx_config }
sub probe() {
#-for Pixel tests
#- my @c = { driver => 'Card:Matrox Millennium G400 DualHead', description => 'Matrox|Millennium G400 Dual HeadCard' };
- my @c = detect_devices::matching_driver('(Card|Server|Driver):');
+ my @c = detect_devices::matching_driver__regexp('(Card|Server|Driver):');
my @cards = map {
my @l = $_->{description} =~ /(.*?)\|(.*)/;
@@ -579,3 +579,4 @@ Option "FSAAMSPosY5" "0.000000"
END
1;
+
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index bbe956849..7bb1facd1 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -789,7 +789,7 @@ sub method_choices {
grep {
!(/lilo/ && isLoopback($root_part))
- && !(/lilo-graphic/ && detect_devices::matching_desc('ProSavageDDR'))
+ && !(/lilo-graphic/ && detect_devices::matching_desc__regexp('ProSavageDDR'))
&& !(/grub/ && isRAID($root_part));
} method_choices_raw();
}
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 89d2ca4ac..015d266bf 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -86,7 +86,7 @@ sub availableRamMB() {
my $s = MDK::Common::System::availableRamMB();
#- HACK HACK: if i810 and memsize
require detect_devices;
- return $s - 1 if $s == 128 && detect_devices::matching_driver('^Card:Intel 810$');
+ return $s - 1 if $s == 128 && detect_devices::matching_driver__regexp('^Card:Intel 810$');
$s;
}
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 05b4536a8..b9416d084 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -463,7 +463,7 @@ sub getSerialModem {
sub getModem {
my ($modules_conf) = @_;
- getSerialModem($modules_conf, {}), matching_driver('www\.linmodems\.org'),
+ getSerialModem($modules_conf, {}), matching_driver__regexp('www\.linmodems\.org'),
grep { member($_->{driver}, qw(snd-atiixp-modem snd-intel8x0m)) } probeall();
}
@@ -685,11 +685,11 @@ sub probeall() {
require sbus_probing::main;
pci_probe(), usb_probe(), firewire_probe(), pcmcia_probe(), sbus_probing::main::probe();
}
-sub matching_desc {
+sub matching_desc__regexp {
my ($regexp) = @_;
grep { $_->{description} =~ /$regexp/i } probeall();
}
-sub matching_driver {
+sub matching_driver__regexp {
my ($regexp) = @_;
grep { $_->{driver} =~ /$regexp/i } probeall();
}
@@ -777,10 +777,10 @@ sub isLaptop() {
arch() =~ /ppc/ ?
get_mac_model() =~ /Book/ :
dmidecode()->{isLaptop}
- || (matching_desc('C&T.*655[45]\d') || matching_desc('C&T.*68554') ||
- matching_desc('Neomagic.*Magic(Media|Graph)') ||
- matching_desc('ViRGE.MX') || matching_desc('S3.*Savage.*[IM]X') ||
- matching_desc('ATI.*(Mobility|LT)'))
+ || (matching_desc__regexp('C&T.*655[45]\d') || matching_desc__regexp('C&T.*68554') ||
+ matching_desc__regexp('Neomagic.*Magic(Media|Graph)') ||
+ matching_desc__regexp('ViRGE.MX') || matching_desc__regexp('S3.*Savage.*[IM]X') ||
+ matching_desc__regexp('ATI.*(Mobility|LT)'))
|| cat_('/proc/cpuinfo') =~ /\bmobile\b/i;
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 4410aa947..a64dade5e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -596,20 +596,20 @@ sub setDefaultPackages {
$o->{rpmsrate_flags_chosen}{CDCOM} = 1 if any { $_->{descr} =~ /commercial/i } values %{$o->{packages}{mediums}};
$o->{rpmsrate_flags_chosen}{TV} = 1 if detect_devices::getTVcards();
$o->{rpmsrate_flags_chosen}{'3D'} = 1 if
- detect_devices::matching_desc('Matrox.* G[245][05]0') ||
- detect_devices::matching_desc('Rage X[CL]') ||
- detect_devices::matching_desc('3D Rage (?:LT|Pro)') ||
- detect_devices::matching_desc('Voodoo [35]') ||
- detect_devices::matching_desc('Voodoo Banshee') ||
- detect_devices::matching_desc('8281[05].* CGC') ||
- detect_devices::matching_desc('Rage 128') ||
- detect_devices::matching_desc('Radeon ') || #- all Radeon card are now 3D with 4.3.0
- detect_devices::matching_desc('[nN]Vidia.*T[nN]T2') || #- TNT2 cards
- detect_devices::matching_desc('[nN][vV]idia.*NV[56]') ||
- detect_devices::matching_desc('[nN][vV]idia.*Vanta') ||
- detect_devices::matching_desc('[nN][vV]idia.*[gG]e[fF]orce') || #- GeForce cards
- detect_devices::matching_desc('[nN][vV]idia.*NV1[15]') ||
- detect_devices::matching_desc('[nN][vV]idia.*Quadro');
+ detect_devices::matching_desc__regexp('Matrox.* G[245][05]0') ||
+ detect_devices::matching_desc__regexp('Rage X[CL]') ||
+ detect_devices::matching_desc__regexp('3D Rage (?:LT|Pro)') ||
+ detect_devices::matching_desc__regexp('Voodoo [35]') ||
+ detect_devices::matching_desc__regexp('Voodoo Banshee') ||
+ detect_devices::matching_desc__regexp('8281[05].* CGC') ||
+ detect_devices::matching_desc__regexp('Rage 128') ||
+ detect_devices::matching_desc__regexp('Radeon ') || #- all Radeon card are now 3D with 4.3.0
+ detect_devices::matching_desc__regexp('[nN]Vidia.*T[nN]T2') || #- TNT2 cards
+ detect_devices::matching_desc__regexp('[nN][vV]idia.*NV[56]') ||
+ detect_devices::matching_desc__regexp('[nN][vV]idia.*Vanta') ||
+ detect_devices::matching_desc__regexp('[nN][vV]idia.*[gG]e[fF]orce') || #- GeForce cards
+ detect_devices::matching_desc__regexp('[nN][vV]idia.*NV1[15]') ||
+ detect_devices::matching_desc__regexp('[nN][vV]idia.*Quadro');
my @locale_pkgs = map { pkgs::packagesProviding($o->{packages}, 'locales-' . $_) } lang::langsLANGUAGE($o->{locale}{langs});
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index e6a24516a..7a7ee2b7a 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -853,22 +853,22 @@ sub setupBootloaderBefore {
}
#- check for valid fb mode to enable a default boot with frame buffer.
- my $vga = $o->{allowFB} && (!detect_devices::matching_desc('3D Rage LT') &&
- !detect_devices::matching_desc('Rage Mobility [PL]') &&
- !detect_devices::matching_desc('i740') &&
- !detect_devices::matching_desc('Matrox') &&
- !detect_devices::matching_desc('Tseng.*ET6\d00') &&
- !detect_devices::matching_desc('SiS.*SG86C2.5') &&
- !detect_devices::matching_desc('SiS.*559[78]') &&
- !detect_devices::matching_desc('SiS.*300') &&
- !detect_devices::matching_desc('SiS.*540') &&
- !detect_devices::matching_desc('SiS.*6C?326') &&
- !detect_devices::matching_desc('SiS.*6C?236') &&
- !detect_devices::matching_desc('Voodoo [35]|Voodoo Banshee') && #- 3d acceleration seems to bug in fb mode
- !detect_devices::matching_desc('828[14][05].* CGC') #- i810 & i845 now have FB support during install but we disable it afterwards
+ my $vga = $o->{allowFB} && (!detect_devices::matching_desc__regexp('3D Rage LT') &&
+ !detect_devices::matching_desc__regexp('Rage Mobility [PL]') &&
+ !detect_devices::matching_desc__regexp('i740') &&
+ !detect_devices::matching_desc__regexp('Matrox') &&
+ !detect_devices::matching_desc__regexp('Tseng.*ET6\d00') &&
+ !detect_devices::matching_desc__regexp('SiS.*SG86C2.5') &&
+ !detect_devices::matching_desc__regexp('SiS.*559[78]') &&
+ !detect_devices::matching_desc__regexp('SiS.*300') &&
+ !detect_devices::matching_desc__regexp('SiS.*540') &&
+ !detect_devices::matching_desc__regexp('SiS.*6C?326') &&
+ !detect_devices::matching_desc__regexp('SiS.*6C?236') &&
+ !detect_devices::matching_desc__regexp('Voodoo [35]|Voodoo Banshee') && #- 3d acceleration seems to bug in fb mode
+ !detect_devices::matching_desc__regexp('828[14][05].* CGC') #- i810 & i845 now have FB support during install but we disable it afterwards
);
- my $force_vga = $o->{allowFB} && (detect_devices::matching_desc('SiS.*630') || #- SiS 630 need frame buffer.
- detect_devices::matching_desc('GeForce.*Integrated') #- needed for fbdev driver (hack).
+ my $force_vga = $o->{allowFB} && (detect_devices::matching_desc__regexp('SiS.*630') || #- SiS 630 need frame buffer.
+ detect_devices::matching_desc__regexp('GeForce.*Integrated') #- needed for fbdev driver (hack).
);
#- propose the default fb mode for kernel fb, if aurora or bootsplash is installed.
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c94985fc2..ca694f54c 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -531,10 +531,10 @@ sub read_rpmsrate {
my ($inv, $p);
$flag = join('||', grep {
if (($inv, $p) = /^(!)?HW"(.*)"/) {
- ($inv xor detect_devices::matching_desc($p)) and $ok = 1;
+ ($inv xor detect_devices::matching_desc__regexp($p)) and $ok = 1;
0;
} elsif (($inv, $p) = /^(!)?DRIVER"(.*)"/) {
- ($inv xor detect_devices::matching_driver($p)) and $ok = 1;
+ ($inv xor detect_devices::matching_driver__regexp($p)) and $ok = 1;
0;
} elsif (($inv, $p) = /^(!)?TYPE"(.*)"/) {
($inv xor detect_devices::matching_type($p)) and $ok = 1;