From 3acf5373424b4474eaf81c19602beb90e025181a Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 3 Oct 2001 15:43:10 +0000 Subject: added extension to pro suite CD (added kernel-enterprise to possibly installable and install kernel22). --- rescue/tree/etc/oem | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 90 insertions(+), 2 deletions(-) (limited to 'rescue/tree/etc/oem') diff --git a/rescue/tree/etc/oem b/rescue/tree/etc/oem index 7d22b815c..21266d1fa 100755 --- a/rescue/tree/etc/oem +++ b/rescue/tree/etc/oem @@ -300,6 +300,93 @@ if (open F, ">/hd/Mandrake/oem_patch.pl") { print "Setting OEM specific extension to DrakX\n"; if (exists $options{server}) { print F q{ + use install_any; + package install_any; + undef *setPackages; + *setPackages = sub { + my ($o) = @_; + + require pkgs; + if (!$o->{packages} || is_empty_hash_ref($o->{packages}{names})) { + $o->{packages} = pkgs::psUsingHdlists($o->{prefix}, $o->{method}); + + push @{$o->{default_packages}}, "nfs-utils-clients" if $o->{method} eq "nfs"; + push @{$o->{default_packages}}, "numlock" if $o->{miscellaneous}{numlock}; + push @{$o->{default_packages}}, "kernel-enterprise" if (availableRamMB() > 800) && (arch() !~ /ia64/); + push @{$o->{default_packages}}, "kernel22" if !$::oem && c::kernel_version() =~ /^\Q2.2/; + push @{$o->{default_packages}}, "kernel-smp" if detect_devices::hasSMP(); + push @{$o->{default_packages}}, "kernel-pcmcia-cs" if $o->{pcmcia}; + push @{$o->{default_packages}}, "raidtools" if !is_empty_array_ref($o->{all_hds}{raids}); + push @{$o->{default_packages}}, "lvm" if !is_empty_array_ref($o->{all_hds}{lvms}); + push @{$o->{default_packages}}, "usbd", "hotplug" if modules::get_alias("usb-interface"); + push @{$o->{default_packages}}, "reiserfsprogs" if grep { isThisFs("reiserfs", $_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "xfsprogs" if grep { isThisFs("xfs", $_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "jfsprogs" if grep { isThisFs("jfs", $_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound-slot-0") =~ /^snd-card-/; + push @{$o->{default_packages}}, "imwheel" if $o->{mouse}{nbuttons} > 3; + + pkgs::getDeps($o->{prefix}, $o->{packages}); + pkgs::selectPackage($o->{packages}, + pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1); + + #- must be done after selecting base packages (to save memory) + pkgs::getProvides($o->{packages}); + + #- must be done after getProvides + pkgs::read_rpmsrate($o->{packages}, getFile("Mandrake/base/rpmsrate")); + ($o->{compssUsers}, $o->{compssUsersSorted}) = pkgs::readCompssUsers($o->{meta_class}); + + if ($::auto_install && $o->{compssUsersChoice}{ALL}) { + $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}{flags}} } @{$o->{compssUsersSorted}}; + } + if (!$o->{compssUsersChoice} && !$o->{isUpgrade}) { + #- by default, choose: + $o->{compssUsersChoice}{$_} = 1 foreach 'GNOME', 'KDE', 'CONFIG', 'X'; + $o->{compssUsersChoice}{$_} = 1 + foreach map { @{$o->{compssUsers}{$_}{flags}} } 'Workstation|Office Workstation', 'Workstation|Internet station'; + } + $o->{compssUsersChoice}{uc($_)} = 1 foreach grep { modules::get_that_type($_) } ('tv', 'scanner', 'photo', 'sound'); + $o->{compssUsersChoice}{uc($_)} = 1 foreach map { $_->{driver} =~ /Flag:(.*)/ } detect_devices::probeall(); + $o->{compssUsersChoice}{SYSTEM} = 1; + $o->{compssUsersChoice}{BURNER} = 1 if detect_devices::burners(); + $o->{compssUsersChoice}{DVD} = 1 if detect_devices::dvdroms(); + $o->{compssUsersChoice}{PCMCIA} = 1 if detect_devices::hasPCMCIA(); + $o->{compssUsersChoice}{HIGH_SECURITY} = 1 if $o->{security} > 3; + $o->{compssUsersChoice}{'3D'} = 1 if + detect_devices::matching_desc('Matrox.* G[245][05]0') || + detect_devices::matching_desc('Riva.*128') || + detect_devices::matching_desc('Rage X[CL]') || + detect_devices::matching_desc('Rage Mobility [PL]') || + 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 ') || + detect_devices::matching_desc('[nN]Vidia.*T[nN]T2') || #- TNT2 cards + detect_devices::matching_desc('[nN]Vidia.*NV[56]') || + detect_devices::matching_desc('[nN]Vidia.*Vanta') || + detect_devices::matching_desc('[nN]Vidia.*GeForce') || #- GeForce cards + detect_devices::matching_desc('[nN]Vidia.*NV1[15]') || + detect_devices::matching_desc('[nN]Vidia.*Quadro'); + + + foreach (map { substr($_, 0, 2) } lang::langs($o->{langs})) { + pkgs::packageByName($o->{packages}, "locales-$_") or next; + push @{$o->{default_packages}}, "locales-$_"; + $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1; #- mainly for zh in case of zh_TW.Big5 + } + foreach (lang::langsLANGUAGE($o->{langs})) { + $o->{compssUsersChoice}{qq(LOCALES"$_")} = 1; + } + $o->{compssUsersChoice}{'CHARSET"' . lang::lang2charset($o->{lang}) . '"'} = 1; + } else { + #- this has to be done to make sure necessary files for urpmi are + #- present. + pkgs::psUpdateHdlistsDeps($o->{prefix}, $o->{method}); + } + } + use install_steps; package install_steps; undef *choosePackages; @@ -612,7 +699,7 @@ sub select_packages { foreach (qw(cups cups-drivers drakprofile draksync numlock raidtools icewm-light Mesa Mesa-demos alsa alsa-utils Mesa-demos glibc vim-minimal kernel - )) { + ), exists $options{server} ? qw(kernel22) : ()) { my $pkg = pkgs::packageByName($o->{packages}, $_); $pkg and pkgs::selectPackage($o->{packages}, $pkg); } @@ -623,7 +710,8 @@ sub select_packages { csmash chromium tuxracer armagetron alsa imwheel nfs-utils-clients lvm usbd hotplug reiserfsprogs xfsprogs jfsprogs sox aumix xmms-arts xawtv gatos kwintv sane-frontends gphoto gnome-toaster gcombust xcdroast apmd cdlabelgen - ), exists $options{server} ? qw(Aurora Aurora-Monitor-NewStyle-Categorizing-WsLib) : ()) { + ), exists $options{server} ? qw(Aurora Aurora-Monitor-NewStyle-Categorizing-WsLib + kernel-enterprise kernel22-secure) : ()) { my $pkg = pkgs::packageByName($o->{packages}, $_); if ($pkg) { pkgs::selectPackage($o->{packages}, $pkg); -- cgit v1.2.1