diff options
author | Francois Pons <fpons@mandriva.com> | 2000-07-11 18:04:41 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-07-11 18:04:41 +0000 |
commit | b54d78676ac459c8fb94bc6b43caa29d5764e9bd (patch) | |
tree | 9d2fd1d49dcec4b27904ee46a9ee507104a71e91 | |
parent | 4c2fb3914a389afd7a79bbabea1dde6968448505 (diff) | |
download | drakx-backup-do-not-use-b54d78676ac459c8fb94bc6b43caa29d5764e9bd.tar drakx-backup-do-not-use-b54d78676ac459c8fb94bc6b43caa29d5764e9bd.tar.gz drakx-backup-do-not-use-b54d78676ac459c8fb94bc6b43caa29d5764e9bd.tar.bz2 drakx-backup-do-not-use-b54d78676ac459c8fb94bc6b43caa29d5764e9bd.tar.xz drakx-backup-do-not-use-b54d78676ac459c8fb94bc6b43caa29d5764e9bd.zip |
*** empty log message ***
-rw-r--r-- | perl-install/ChangeLog | 9 | ||||
-rw-r--r-- | perl-install/any.pm | 48 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 683 | ||||
-rw-r--r-- | perl-install/install_any.pm | 22 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 45 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 147 | ||||
-rw-r--r-- | perl-install/share/compssList | 21 | ||||
-rw-r--r-- | perl-install/share/compssUsers | 68 |
8 files changed, 848 insertions, 195 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 50126ab57..2144330f6 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,12 @@ +2000-07-11 François Pons <fpons@mandrakesoft.com> + + * bootloader.pm: merged lilo.pm and silo.pm inside bootloader.pm, + this include a configure_entry from silo.pm to build a initrd if + used. + * share/compssList: added kde2 packages. + * share/compssUsers: added kde2 group, renamed kde to kde1 group + specific. + 2000-07-07 François Pons <fpons@mandrakesoft.com> * install2.pm (choosePackages): always execute setPackage to copy diff --git a/perl-install/any.pm b/perl-install/any.pm index 9737b264f..23313c5f6 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -60,17 +60,24 @@ sub setupBootloader { my @l = (__("First sector of drive (MBR)"), __("First sector of boot partition")); $in->set_help('setupBootloaderBeginner') unless $::isStandalone; - my $boot = $hds->[0]{device}; - my $onmbr = "/dev/$boot" eq $b->{boot}; - $b->{boot} = "/dev/" . ($in->ask_from_list_(_("LILO/grub Installation"), - _("Where do you want to install the bootloader?"), - \@l, $l[!$onmbr]) eq $l[0] - ? $boot : fsedit::get_root($fstab, 'boot')->{device}); + if (arch() =~ /sparc/) { + $b->{use_partition} = $in->ask_from_list_(_("SILO Installation"), + _("Where do you want to install the bootloader?"), + \@l, $l[$b->{use_partition}]); + } else { + my $boot = $hds->[0]{device}; + my $onmbr = "/dev/$boot" eq $b->{boot}; + $b->{boot} = "/dev/" . ($in->ask_from_list_(_("LILO/grub Installation"), + _("Where do you want to install the bootloader?"), + \@l, $l[!$onmbr]) eq $l[0] + ? $boot : fsedit::get_root($fstab, 'boot')->{device}); + } } elsif ($more || !$::beginner) { - $in->set_help("setupBootloaderGeneral") unless $::isStandalone; + $in->set_help(arch() =~ /sparc/ ? "setupSILOGeneral" : "setupBootloaderGeneral") unless $::isStandalone; #- TO MERGE ? if ($::expert) { - my $m = $in->ask_from_list_('', _("Which bootloader(s) do you want to use?"), [ keys(%{$b->{methods}}), __("None") ], 'grub') or return; + my $default = arch() =~ /sparc/ ? 'silo' : 'grub'; + my $m = $in->ask_from_list_('', _("Which bootloader(s) do you want to use?"), [ keys(%{$b->{methods}}), __("None") ], $default) or return; $b->{methods}{$_} = 0 foreach keys %{$b->{methods}}; $b->{methods}{$m} = 1 if $m ne "None"; } @@ -80,19 +87,25 @@ sub setupBootloader { #- put lilo if grub is chosen, so that /etc/lilo.conf is generated exists $b->{methods}{lilo} and $b->{methods}{lilo} = 1 if $b->{methods}{grub}; + my @silo_install_lang = (_("First sector of drive (MBR)"), _("First sector of boot partition")); + my $silo_install_lang = $silo_install_lang[$b->{use_partition}]; my @l = ( +arch() =~ /sparc/ ? ( +_("Bootloader installation") => { val => \$silo_install_lang, list => \@silo_install_lang, not_edit => 1 }, +) : ( _("Boot device") => { val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } @$hds, @$fstab), detect_devices::floppies() ], not_edit => !$::expert }, _("LBA (doesn't work on old BIOSes)") => { val => \$b->{lba32}, type => "bool", text => "lba" }, _("Compact") => { val => \$b->{compact}, type => "bool", text => _("compact") }, +_("Video mode") => { val => \$b->{vga}, list => [ keys %bootloader::vga_modes ], not_edit => $::beginner }, +), _("Delay before booting default image") => \$b->{timeout}, -_("Video mode") => { val => \$b->{vga}, list => [ keys %lilo::vga_modes ], not_edit => $::beginner }, $security < 4 ? () : ( _("Password") => { val => \$b->{password}, hidden => 1 }, _("Password (again)") => { val => \$b->{password2}, hidden => 1 }, _("Restrict command line options") => { val => \$b->{restricted}, type => "bool", text => _("restrict") }, ) ); - @l = @l[0..3] unless $::expert; + @l = @l[0..3] unless $::expert; #- take "bootloader installation" and "delay before ..." on SPARC. $b->{vga} ||= 'Normal'; $in->ask_from_entries_refH('', _("Bootloader main options"), \@l, @@ -103,11 +116,12 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool" 0; } ) or return 0; - $b->{vga} = $lilo::vga_modes{$b->{vga}} || $b->{vga}; + $b->{use_partition} = $silo_install_lang eq _("First sector of drive (MBR)") ? 0 : 1; + $b->{vga} = $bootloader::vga_modes{$b->{vga}} || $b->{vga}; } until ($::beginner && $more <= 1) { - $in->set_help('setupBootloaderAddEntry') unless $::isStandalone; + $in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone; my $c = $in->ask_from_list_([''], _("Here are the different entries. You can add some more or change the existing ones."), @@ -120,12 +134,14 @@ You can add some more or change the existing ones."), if ($c eq "Add") { my @labels = map { $_->{label} } @{$b->{entries}}; my $prefix; - if ($in->ask_from_list_('', _("Which type of entry do you want to add?"), [ __("Linux"), __("Other OS (windows...)") ]) eq "Linux") { + if ($in->ask_from_list_('', _("Which type of entry do you want to add?"), + [ __("Linux"), arch() =~ /sparc/ ? __("Other OS (SunOS...)") : __("Other OS (windows...)") ] + ) eq "Linux") { $e = { type => 'image' }; $prefix = "linux"; } else { $e = { type => 'other' }; - $prefix = "windows"; + $prefix = arch() =~ /sparc/ ? "sunos" : "windows"; } $e->{label} = $prefix; for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb" } @@ -149,8 +165,10 @@ _("Read-write") => { val => \$e->{'read-write'}, type => 'bool' } } else { @l = ( _("Root") => { val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @$fstab ], not_edit => !$::expert }, +arch() !~ /sparc/ ? ( _("Table") => { val => \$e->{table}, list => [ '', map { "/dev/$_->{device}" } @$hds ], not_edit => !$::expert }, _("Unsafe") => { val => \$e->{unsafe}, type => 'bool' } +) : (), ); @l = @l[0..1] unless $::expert; } @@ -168,6 +186,8 @@ _("Default") => { val => \$default, type => 'bool' }, 0; })) { $b->{default} = $old_default || $default ? $default && $e->{label} : $b->{default}; + require bootloader; + bootloader::configure_entry($prefix, $e); #- hack to make sure initrd file are built. push @{$b->{entries}}, $e if $c eq "Add"; } else { diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm new file mode 100644 index 000000000..11f9d2ae3 --- /dev/null +++ b/perl-install/bootloader.pm @@ -0,0 +1,683 @@ +package bootloader; + +use diagnostics; +use strict; +use vars qw(%vga_modes); + +#-###################################################################################### +#- misc imports +#-###################################################################################### +use common qw(:common :file :functional :system); +use partition_table qw(:types); +use log; +use fsedit; +use loopback; +use commands; +use detect_devices; +use partition_table_raw; +use run_program; +use modules; + + +%vga_modes = ( + "Ask at boot" => 'ask', + "Normal" => 'normal', + "80x50" => '0x0f01', + "80x43" => '0x0f02', + "80x28" => '0x0f03', + "80x30" => '0x0f04', + "80x34" => '0x0f05', + "80x60" => '0x0f06', + "100x30" => '0x0122', +); + +my %vga_modes2nb = ( + 'ask' => -3, + 'normal' => -1, +#- other entries are identity +); + + +#-##################################################################################### +#- Functions +#-##################################################################################### + +sub get { + my ($kernel, $bootloader) = @_; + $_->{kernel_or_dev} && $_->{kernel_or_dev} eq $kernel and return $_ foreach @{$bootloader->{entries}}; + undef; +} +sub get_label { + my ($label, $bootloader) = @_; + $_->{label} && $_->{label} eq $label and return $_ foreach @{$bootloader->{entries}}; + undef; +} + +sub mkinitrd($$$) { + my ($prefix, $kernelVersion, $initrdImage) = @_; + + $::testing || -e "$prefix/$initrdImage" and return; + + my $loop_boot = loopback::prepare_boot($prefix); + + modules::load('loop'); + run_program::rooted($prefix, "mkinitrd", "-f", $initrdImage, "--ifneeded", $kernelVersion) or unlink("$prefix/$initrdImage"); + + loopback::save_boot($loop_boot); + + -e "$prefix/$initrdImage" or die "mkinitrd failed"; +} + +sub mkbootdisk($$$;$) { + my ($prefix, $kernelVersion, $dev, $append) = @_; + + modules::load_multi(arch() =~ /sparc/ ? 'romfs' : (), 'loop'); + my @l = qw(mkbootdisk --noprompt); + push @l, "--appendargs", $append if $append; + push @l, "--bios", 0, if $dev !~ /fd/; + run_program::rooted($prefix, @l, "--device", "/dev/$dev", $kernelVersion) or die "mkbootdisk failed"; +} + +sub read($$) { + my ($prefix, $file) = @_; + my $global = 1; + my ($e, $v, $f); + my %b; + foreach (cat_("$prefix$file")) { + ($_, $v) = /^\s*(.*?)\s*(?:=\s*(.*?))?\s*$/; + + if (/^(image|other)$/) { + push @{$b{entries}}, $e = { type => $_, kernel_or_dev => $v }; + $global = 0; + } elsif ($global) { + $b{$_} = $v || 1; + } else { + if ((/map-drive/ .. /to/) && /to/) { + $e->{mapdrive}{$e->{'map-drive'}} = $v; + } else { + $e->{$_} = $v || 1; + } + } + } + delete $b{timeout} unless $b{prompt}; + $_->{append} =~ s/^\s*"?(.*?)"?\s*$/$1/ foreach \%b, @{$b{entries}}; + $b{timeout} = $b{timeout} / 10 if $b{timeout}; + $b{message} = cat_("$prefix$b{message}") if $b{message}; + \%b; +} + +sub suggest_onmbr($) { + my ($hds) = @_; + + my $type = partition_table_raw::typeOfMBR($hds->[0]{device}); + !$type || member($type, qw(dos dummy lilo grub empty)), !$type; +} + +sub add_entry($$) { + my ($entries, $v) = @_; + my (%usedold, $freeold); + + do { $usedold{$1 || 0} = 1 if $_->{label} =~ /^old ([^_]*)_/x } foreach @$entries; + foreach (0..scalar keys %usedold) { exists $usedold{$_} or $freeold = $_ || '', last } + + do { $_->{label} = "old${freeold}_$_->{label}" if $_->{label} eq $v->{label} } foreach @$entries; + push @$entries, $v; +} + +sub add_kernel($$$$$) { + my ($prefix, $lilo, $kernelVersion, $specific, $v) = @_; + my $ext = $specific && "-$specific"; + my ($vmlinuz, $image, $initrdImage) = ("vmlinuz-$kernelVersion$specific", "/boot/vmlinuz$ext", "/boot/initrd$ext.img"); + -e "$prefix/boot/$vmlinuz" or log::l("unable to find kernel image $prefix/boot/$vmlinuz"), return; + { + my $f = "initrd-$kernelVersion$specific.img"; + eval { mkinitrd($prefix, "$kernelVersion$specific", "/boot/$f") }; + undef $initrdImage if $@; + symlinkf $f, "$prefix$initrdImage" or $initrdImage = "/boot/$f" + if $initrdImage; + } + symlinkf "$vmlinuz", "$prefix/$image" or $image = "/boot/$vmlinuz"; + add2hash($v, + { + type => 'image', + label => 'linux', + kernel_or_dev => $image, + initrd => $initrdImage, + append => $lilo->{perImageAppend}, + }); + add_entry($lilo->{entries}, $v); + $v; +} + +sub configure_entry($$) { + my ($prefix, $entry) = @_; + if ($entry->{type} eq 'image') { + my $specific_version; + $entry->{kernel_or_dev} =~ /vmlinu.-(.*)/ and $specific_version = $1; + readlink("$prefix/$entry->{kernel_or_dev}") =~ /vmlinu.-(.*)/ and $specific_version = $1; + + if ($specific_version) { + $entry->{initrd} or $entry->{initrd} = "/boot/initrd-$specific_version.img"; + unless (-e "$prefix/$entry->{initrd}") { + eval { mkinitrd($prefix, $specific_version, "$entry->{initrd}") }; + undef $entry->{initrd} if $@; + } + } + } + $entry; +} + +sub dev2prompath { #- SPARC only + my ($dev) = @_; + my ($wd, $num) = $dev =~ /^(.*\D)(\d*)$/; + require c; + $dev = c::disk2PromPath($wd) and $dev = $dev =~ /^sd\(/ ? "$dev$num" : "$dev;$num"; + $dev; +} + +sub suggest($$$$$) { + my ($prefix, $lilo, $hds, $fstab, $kernelVersion) = @_; + my $root_part = fsedit::get_root($fstab); + my $root = isLoopback($root_part) ? "loop7" : $root_part->{device}; + my $boot = fsedit::get_root($fstab, 'boot')->{device}; + + require c; c::initSilo() if arch() =~ /sparc/; + + my ($onmbr, $unsafe) = $lilo->{crushMbr} ? (1, 0) : suggest_onmbr($hds); + add2hash_($lilo, arch() =~ /sparc/ ? + { + default => "linux", + entries => [], + timeout => 5, + use_partition => 0, #- we should almost always have a whole disk partition. + root => "/dev/$root", + partition => $partition || 1, + boot => $root eq $boot && "/boot", #- this helps for getting default partition for silo. + } : + { + boot => "/dev/" . ($onmbr ? $hds->[0]{device} : fsedit::get_root($fstab, 'boot')->{device}), + bootUnsafe => $unsafe, + map => "/boot/map", + default => "linux", + lba32 => 1, + entries => [], + timeout => $onmbr && 5, + install => "/boot/boot.b", + }); +#- the following is not needed anymore with latest lilo +#- $lilo->{disk} ||= "/dev/$hds->[0]{device} bios=0x80" if $hds->[0]{device} =~ /^hd[be]$/; + + if (!$lilo->{message} || $lilo->{message} eq "1") { + $lilo->{message} = join('', cat_("$prefix/boot/message")); + if (!$lilo->{message}) { + my $msg_en = +__("Welcome to %s the operating system chooser! + +To list the possible choices, press <TAB>. + +To load one of them, write its name and press <ENTER> or +wait %d seconds for default boot. + +"); + my $msg = translate($msg_en); + #- use the english version if more than 20% of 8bits chars + $msg = $msg_en if int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) > 0.2; + $lilo->{message} = sprintf $msg, arch() =~ /sparc/ ? "SILO" : "LILO", $lilo->{timeout}; + } + } + + my $isSecure = -e "$prefix/boot/vmlinuz-${kernelVersion}secure"; + + my $isSMP = detect_devices::hasSMP(); + if ($isSMP && !-e "$prefix/boot/vmlinuz-${kernelVersion}smp") { + log::l("SMP machine, but no SMP kernel found") unless $isSecure; + $isSMP = 0; + } + add_kernel($prefix, $lilo, $kernelVersion, $isSecure ? 'secure' : 'smp', + { + label => 'linux', + root => "/dev/$root", + }) if $isSecure || $isSMP; + add_kernel($prefix, $lilo, $kernelVersion, '', + { + label => $isSecure || $isSMP ? 'linux-up' : 'linux', + root => "/dev/$root", + }); + add_kernel($prefix, $lilo, $kernelVersion, '', + { + label => 'failsafe', + root => "/dev/$root", + })->{append} .= " failsafe" unless $lilo->{password}; + + if (arch() =~ /sparc/) { + #- search for SunOS, it could be a really better approach to take into account + #- partition type for mounting point. + my $sunos = 0; + foreach (@$hds) { + foreach (@{$_->{primary}{normal}}) { + my $path = $_->{device} =~ m|^/| && $_->{device} !~ m|^/dev/| ? $_->{device} : dev2prompath($_->{device}); + add_entry($lilo->{entries}, + { + type => 'other', + kernel_or_dev => $path, + label => "sunos" . ($sunos++ ? $sunos : ''), + }) if $path && isSunOS($_) && type2name($_->{type}) =~ /root/i; + } + } + } else { + #- search for dos (or windows) boot partition. Don't look in extended partitions! + my ($dos, $win) = 0, 0; + foreach (@$hds) { + foreach (@{$_->{primary}{normal}}) { + add_entry($lilo->{entries}, + { + type => 'other', + kernel_or_dev => "/dev/$_->{device}", + label => isDos($_) ? "dos" . ($dos++ ? $dos : '') : "windows" . ($win++ ? $win : '') , + table => "/dev/$_->{rootDevice}", + }) if isFat($_) && isFat({ type => fsedit::typeOfPart($_->{device}) }); + } + } + } + my %l = ( + silo => bool(arch() =~ /sparc/), + lilo => bool(arch() !~ /sparc/) && !isLoopback(fsedit::get_root($fstab)), + grub => bool(arch() !~ /sparc/) && !$::o->{lnx4win}, #1,#!isReiserfs(fsedit::get_root($fstab, 'boot')), + loadlin => bool(arch() !~ /sparc/) && -e "/initrd/loopfs/lnx4win", + ); + $lilo->{methods} ||= { map { $_ => 1 } grep { $l{$_} } keys %l }; +} + +sub suggest_floppy { + my ($bootloader) = @_; + + add_entry($bootloader->{entries}, + { + type => 'other', + kernel_or_dev => '/dev/fd0', + label => 'floppy', + unsafe => 1 + }); +} + +sub keytable($$) { + my ($prefix, $f) = @_; + local $_ = $f; + if ($_ && !/\.klt$/) { + $f = "/boot/$_.klt"; + run_program::rooted($prefix, "keytab-lilo.pl", ">", $f, $_) or undef $f; + } + $f && -r "$prefix/$f" && $f; +} + +sub install_silo($$$) { + my ($prefix, $silo, $fstab) = @_; + my $boot = fsedit::get_root($fstab, 'boot')->{device}; + my ($wd, $num) = $boot =~ /^(.*\D)(\d*)$/; + + #- setup boot promvars for. + require c; + if ($boot =~ /^md/) { + #- get all mbr devices according to /boot are listed, + #- then join all zero based partition translated to prom with ';'. + #- keep bootdev with the first of above. + log::l("/boot is present on raid partition which is not currently supported for promvars"); + } else { + if (!$silo->{use_partition}) { + foreach (@$fstab) { + if (!$_->{start} && $_->{device} =~ /$wd/) { + $boot = $_->{device}; + log::l("found a zero based partition in $wd as $boot"); + last; + } + } + } + $silo->{bootalias} = c::disk2PromPath($boot); + $silo->{bootdev} = $silo->{bootalias}; + log::l("preparing promvars for device=$boot"); + } + c::hasAliases() or log::l("clearing promvars alias as non supported"), $silo->{bootalias} = ''; + + if ($silo->{message}) { + local *F; + open F, ">$prefix/boot/message" and print F $silo->{message} or $silo->{message} = 0; + } + { + local *F; + local $\ = "\n"; + my $f = "$prefix/boot/silo.conf"; #- always write the silo.conf file in /boot ... + symlinkf "../boot/silo.conf", "$prefix/etc/silo.conf"; #- ... and make a symlink from /etc. + open F, ">$f" or die "cannot create silo config file: $f"; + log::l("writing silo config to $f"); + + $silo->{$_} and print F "$_=$silo->{$_}" foreach qw(partition root default append); + $silo->{$_} and print F $_ foreach qw(restricted); + #- print F "password=", $silo->{password} if $silo->{restricted} && $silo->{password}; #- done by msec + print F "timeout=", round(10 * $silo->{timeout}) if $silo->{timeout}; + print F "message=$silo->{boot}/message" if $silo->{message}; + + foreach (@{$silo->{entries}}) {#my ($v, $e) = each %{$silo->{entries}}) { + my $type = "$_->{type}=$_->{kernel_or_dev}"; $type =~ s|/boot|$silo->{boot}|; + print F $type; + print F "\tlabel=$_->{label}"; + + if ($_->{type} eq "image") { + my $initrd = $_->{initrd}; $initrd =~ s|/boot|$silo->{boot}|; + print F "\tpartition=$_->{partition}" if $_->{partition}; + print F "\troot=$_->{root}" if $_->{root}; + print F "\tinitrd=$initrd" if $_->{initrd}; + print F "\tappend=\"$1\"" if $_->{append} =~ /^\s*"?(.*?)"?\s*$/; + print F "\tread-write" if $_->{'read-write'}; + print F "\tread-only" if !$_->{'read-write'}; + } + } + } + log::l("Installing boot loader..."); + $::testing and return; + run_program::rooted($prefix, "silo", "2>", "/tmp/.error", $silo->{use_partition} ? ("-t") : ()) or + run_program::rooted($prefix, "silo", "2>", "/tmp/.error", "-p", "2", $silo->{use_partition} ? ("-t") : ()) or + die "silo failed"; + unlink "$prefix/tmp/.error"; + + #- try writing in the prom. + log::l("setting promvars alias=$silo->{bootalias} bootdev=$silo->{bootdev}"); + require c; + c::setPromVars($silo->{bootalias}, $silo->{bootdev}); +} + +sub install_lilo($$) { + my ($prefix, $lilo) = @_; + $lilo->{prompt} = $lilo->{timeout}; + + if ($lilo->{message}) { + local *F; + open F, ">$prefix/boot/message" and print F $lilo->{message} or $lilo->{message} = 0; + } + { + local *F; + local $\ = "\n"; + my $f = "$prefix/etc/lilo.conf"; + open F, ">$f" or die "cannot create lilo config file: $f"; + log::l("writing lilo config to $f"); + + $lilo->{$_} and print F "$_=$lilo->{$_}" foreach qw(boot map install vga default append keytable disk); + $lilo->{$_} and print F $_ foreach qw(linear lba32 compact prompt restricted); + #- print F "password=", $lilo->{password} if $lilo->{restricted} && $lilo->{password}; #- done by msec + print F "timeout=", round(10 * $lilo->{timeout}) if $lilo->{timeout}; + print F "message=/boot/message" if $lilo->{message}; + + foreach (@{$lilo->{entries}}) { + print F "$_->{type}=$_->{kernel_or_dev}"; + print F "\tlabel=", substr($_->{label}, 0, 15); #- lilo doesn't handle more than 15 char long labels + + if ($_->{type} eq "image") { + print F "\troot=$_->{root}"; + print F "\tinitrd=$_->{initrd}" if $_->{initrd}; + print F "\tappend=\"$_->{append}\"" if $_->{append}; + print F "\tvga=$_->{vga}" if $_->{vga}; + print F "\tread-write" if $_->{'read-write'}; + print F "\tread-only" if !$_->{'read-write'}; + } else { + print F "\ttable=$_->{table}" if $_->{table}; + print F "\tunsafe" if $_->{unsafe} && !$_->{table}; + + #- boot off the second drive, so reverse the BIOS maps + $_->{mapdrive} ||= { '0x80' => '0x81', '0x81' => '0x80' } + if $_->{table} && $lilo->{boot} !~ /$_->{table}/; + + while (my ($from, $to) = each %{$_->{mapdrive} || {}}) { + print F "\tmap-drive=$from"; + print F "\t to=$to"; + } + } + } + } + log::l("Installing boot loader..."); + $::testing and return; + run_program::rooted($prefix, "lilo", "2>", "/tmp/.error") or die "lilo failed"; + unlink "$prefix/tmp/.error"; +} + +sub dev2bios { + my ($hds, $where) = @_; + my @dev = map { $_->{device} } @$hds; + member($where, @dev) or ($where) = @dev; #- if not on mbr, + + s/h(d[e-g])/x$1/ foreach $where, @dev; #- emulates ultra66 as xd_ + + my $start = substr($where, 0, 2); + + my $translate = sub { + $_ eq $where ? "aaa" : #- if exact match, value it first + /^$start(.*)/ ? "ad$1" : #- if same class (ide/scsi/ultra66), value it before other classes + $_; + }; + @dev = map { $_->[0] } + sort { $a->[1] cmp $b->[1] } + map { [ $_, &$translate ] } @dev; + + s/x(d.)/h$1/ foreach @dev; #- switch back; + + (map_index { $_ => "fd$::i" } detect_devices::floppies()), + (map_index { $_ => "hd$::i" } @dev); +} + +sub dev2grub { + my ($dev, $dev2bios) = @_; + $dev =~ m|^(/dev/)?(...)(.*)$| or die "dev2grub"; + my $grub = $dev2bios->{$2} or die "dev2grub ($2)"; + "($grub" . ($3 && "," . ($3 - 1)) . ")"; +} + +sub install_grub { + my ($prefix, $lilo, $fstab, $hds) = @_; + my %dev2bios = dev2bios($hds, $lilo->{boot}); + + { + my %bios2dev = reverse %dev2bios; + output "$prefix/boot/grub/device.map", + join '', map { "($_) /dev/$bios2dev{$_}\n" } sort keys %bios2dev; + } + my $file2grub = sub { + my $file = expand_symlinks "$prefix$_[0]"; + if (!isReiserfs(fsedit::get_root($fstab, 'boot'))) { #- grub in reiserfs doesn't handle symlinks. + if (my $l = readlink "$prefix$_[0]") { + $l =~ m|/| or $file =~ s/\Q$l/basename $_[0]/e; #- keep simple end symlinks + } + } + unless ($file =~ s/^$prefix//) { + my ($fs) = grep { loopback::carryRootLoopback($_) } @$fstab or die; + log::l("found $fs->{mntpoint}"); + $file =~ s|/initrd/loopfs|$fs->{mntpoint}|; + } + my ($fs); + foreach (@$fstab) { + my $m = $_->{mntpoint}; + $fs = $_ if + $file =~ /^$m/ && + (!$fs || length $fs->{mntpoint} < length $m); + } + $fs or die "file2grub not found $file"; + $file =~ s|$fs->{mntpoint}/?|/|; + dev2grub($fs->{device}, \%dev2bios) . $file; + }; + { + local *F; + local $\ = "\n"; + my $f = "$prefix/boot/grub/menu.lst"; + open F, ">$f" or die "cannot create grub config file: $f"; + log::l("writing grub config to $f"); + + $lilo->{$_} and print F "$_ $lilo->{$_}" foreach qw(timeout); + + print F "color black/cyan yellow/cyan"; + print F "i18n ", $file2grub->("/boot/grub/messages"); + print F "keytable ", $file2grub->($lilo->{keytable}) if $lilo->{keytable}; + + map_index { + print F "default $::i" if $_->{label} eq $lilo->{default}; + } @{$lilo->{entries}}; + + foreach (@{$lilo->{entries}}) { + print F "\ntitle $_->{label}"; + + if ($_->{type} eq "image") { + my $vga = $_->{vga} || $lilo->{vga}; + printf F "kernel %s root=%s %s%s%s\n", + $file2grub->($_->{kernel_or_dev}), + $_->{root} =~ /loop7/ ? "707" : $_->{root}, #- special to workaround bug in kernel (see #ifdef CONFIG_BLK_DEV_LOOP) + $_->{append}, + $_->{'read-write'} && " rw", + $vga && $vga ne "normal" && " vga=$vga"; + print F "initrd ", $file2grub->($_->{initrd}) if $_->{initrd}; + } else { + print F "root ", dev2grub($_->{kernel_or_dev}, \%dev2bios); + if ($_->{kernel_or_dev} !~ /fd/) { + #- boot off the second drive, so reverse the BIOS maps + $_->{mapdrive} ||= { '0x80' => '0x81', '0x81' => '0x80' } + if $_->{table} && $lilo->{boot} !~ /$_->{table}/; + + map_each { print F "map ($::b) ($::a)" } %{$_->{mapdrive} || {}}; + + print F "makeactive"; + } + print F "chainloader +1"; + } + } + } + my $fd = first(detect_devices::floppies()); + my $hd = fsedit::get_root($fstab, 'boot')->{rootDevice}; + + my $dev = dev2grub($lilo->{boot}, \%dev2bios); + my ($s1, $s2, $m) = map { $file2grub->("/boot/grub/$_") } qw(stage1 stage2 menu.lst); + my $f = "/boot/grub/install.sh"; + output "$prefix$f", +"grub --device-map=/boot/grub/device.map --batch <<EOF +install $s1 d $dev $s2 p $m +quit +EOF +"; + + output "$prefix/boot/grub/messages", map { translate($_) . "\n" } ( +__("Welcome to GRUB the operating system chooser!"), +__("Use the %c and %c keys for selecting which entry is highlighted."), +__("Press enter to boot the selected OS, \'e\' to edit the"), +__("commands before booting, or \'c\' for a command-line."), +__("The highlighted entry will be booted automatically in %d seconds."), +); + + my $e = "$prefix/boot/.enough_space"; + output $e, 1; -s $e or die _("not enough room in /boot"); + unlink $e; + + log::l("Installing boot loader..."); + $::testing and return; + symlink "$prefix/boot", "/boot"; + run_program::run("sh", $f) or die "grub installation failed"; + unlink "$prefix/tmp/.error.grub", "/boot"; +} + +sub lnx4win_file { + my $lilo = shift; + map { local $_ = $_; s,/,\\,g; "$lilo->{boot_drive}:\\lnx4win$_" } @_; +} + +sub loadlin_cmd { + my ($prefix, $lilo) = @_; + my $e = get_label("linux", $lilo) || first(grep { $_->{type} eq "image" } @{$lilo->{entries}}); + + commands::cp("$prefix$e->{kernel_or_dev}", "$prefix/boot/vmlinuz") unless -e "$prefix/boot/vmlinuz"; + commands::cp("$prefix$e->{initrd}", "$prefix/boot/initrd.img") unless -e "$prefix/boot/initrd.img"; + + $e->{label}, sprintf"%s %s initrd=%s root=%s $e->{append}", + lnx4win_file($lilo, "/loadlin.exe", "/boot/vmlinuz", "/boot/initrd.img"), + $e->{root} =~ /loop7/ ? "0707" : $e->{root}; #- special to workaround bug in kernel (see #ifdef CONFIG_BLK_DEV_LOOP) +} + +sub install_loadlin { + my ($prefix, $lilo, $fstab) = @_; + + my $boot; + ($boot) = grep { $lilo->{boot} eq "/dev/$_->{device}" } @$fstab; + ($boot) = grep { loopback::carryRootLoopback($_) } @$fstab unless $boot && $boot->{device_windobe}; + ($boot) = grep { isFat($_) } @$fstab unless $boot && $boot->{device_windobe}; + log::l("loadlin device is $boot->{device} (windobe $boot->{device_windobe})"); + $lilo->{boot_drive} = $boot->{device_windobe}; + + my ($winpart) = grep { $_->{device_windobe} eq 'C' } @$fstab; + log::l("winpart is $winpart->{device}"); + my $winhandle = loopback::inspect($winpart, $prefix, 'rw'); + my $windrive = $winhandle->{dir}; + log::l("windrive is $windrive"); + + my $config_sys = "$windrive/config.sys"; + local $_ = cat_($config_sys); + output "$windrive/config.mdk", $_ if $_; + + my $timeout = $lilo->{timeout} || 1; + my ($label, $cmd) = loadlin_cmd($prefix, $lilo); + + $_ = " +[Menu] +menuitem=Windows +menudefault=Windows,$timeout + +[Windows] +" . $_ if !/^\Q[Menu]/m; + + #- remove existing entry + s/^menuitem=$label\s*//mi; + s/\n\[$label\].*?(\n\[|$)/$1/si; + + #- add entry + s/(.*\nmenuitem=[^\n]*)/$1\nmenuitem=$label/s; + + $_ .= " +[$label] +shell=$cmd +"; + output $config_sys, unix2dos($_); + output "/initrd/loopfs/lnx4win/linux.bat", unix2dos( +'@echo off +echo Linux Mandrake +smartdrv /C +' . "$cmd\n"); + + my $windir = lc(cat_("$windrive/msdos.sys") =~ /^WinDir=.:\\(\S+)/m ? $1 : "windows"); + +#-PO: "Desktop" and "Start Menu" are the name of the directories found in c:\windows + foreach (__("Desktop"), __("Start Menu")) { + my $d = "$windrive/$windir/" . translate($_); + -d $d or $d = "$windrive/$windir/$_"; + -d $d or log::l("can't find windows $d directory"), next; + output "$d/Linux4Win.url", unix2dos(sprintf +q([InternetShortcut] +URL=file:\lnx4win\lnx4win.exe +WorkingDirectory=%s +IconFile=%s +IconIndex=0 +), lnx4win_file($lilo, "/", "/lnx4win.ico")); + } + +} + +sub install { + my ($prefix, $lilo, $fstab, $hds) = @_; + + $lilo->{keytable} = keytable($prefix, $lilo->{keytable}); + + my %l = grep_each { $::b } %{$lilo->{methods}}; + my @rcs = map { + my $f = $bootloader::{"install_$_"} or die "unknown bootloader method $_"; + eval { $f->(@_) }; + $@; + } reverse sort keys %l; #- reverse sort for having grub installed after lilo if both are there. + + return if grep { !$_ } @rcs; #- at least one worked? + die first(map { $_ } @rcs); +} + +#-###################################################################################### +#- Wonderful perl :( +#-###################################################################################### +1; # diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 5909636f7..73680fb12 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -533,30 +533,30 @@ sub setupFB { $vga ||= 785; #- assume at least 640x480x16. - require lilo; - #- update lilo entries with a new fb label. a bit hack unless + require bootloader; + #- update bootloader entries with a new fb label. a bit hack unless #- a frame buffer kernel is used, in such case we use it instead #- with the right mode, nothing more to do. foreach (qw(secure smp)) { - if (my $e = lilo::get("/boot/vmlinuz-$_", $o->{bootloader})) { + if (my $e = bootloader::get("/boot/vmlinuz-$_", $o->{bootloader})) { if ($_ eq 'secure') { log::l("warning: kernel-secure is not fb, using a kernel-fb instead"); #- nothing done, fall through linux-fb. } else { $e->{vga} = $vga; - lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}); + bootloader::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}); return 1; } } } - if (lilo::add_kernel($o->{prefix}, $o->{bootloader}, kernelVersion($o), 'fb', - { - label => 'linux-fb', - root => lilo::get("/boot/vmlinuz", $o->{bootloader})->{root}, - vga => $vga, - })) { + if (bootloader::add_kernel($o->{prefix}, $o->{bootloader}, kernelVersion($o), 'fb', + { + label => 'linux-fb', + root => bootloader::get("/boot/vmlinuz", $o->{bootloader})->{root}, + vga => $vga, + })) { $o->{bootloader}{default} = 'linux-fb'; - lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}); + bootloader::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}); } else { log::l("unable to install kernel with frame buffer support, disabling"); return 0; diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 99d338c89..6e1d2f28f 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -749,13 +749,8 @@ sub createBootdisk($) { return if $::testing; - if (arch() =~ /^sparc/) { - require silo; - silo::mkbootdisk($o->{prefix}, install_any::kernelVersion($o), $dev, $o->{bootloader}{perImageAppend}); - } else { - require lilo; - lilo::mkbootdisk($o->{prefix}, install_any::kernelVersion($o), $dev, $o->{bootloader}{perImageAppend}); - } + require bootloader; + bootloader::mkbootdisk($o->{prefix}, install_any::kernelVersion($o), $dev, $o->{bootloader}{perImageAppend}); $o->{mkbootdisk} = $dev; } @@ -764,13 +759,8 @@ sub readBootloaderConfigBeforeInstall { my ($o) = @_; my ($image, $v); - if (arch() =~ /^sparc/) { - require silo; - add2hash($o->{bootloader} ||= {}, silo::read($o->{prefix}, "/etc/silo.conf")); - } else { - require lilo; - add2hash($o->{bootloader} ||= {}, lilo::read($o->{prefix}, "/etc/lilo.conf")); - } + require bootloader; + add2hash($o->{bootloader} ||= {}, bootloader::read($o->{prefix}, arch() =~ /sparc/ ? "/etc/silo.conf" : "/etc/lilo.conf")); #- since kernel or kernel-smp may not be upgraded, it should be checked #- if there is a need to update existing lilo.conf entries by using that @@ -788,13 +778,8 @@ sub readBootloaderConfigBeforeInstall { if (-e "$o->{prefix}$v") { my $e; - if (arch() =~ /sparc/) { - require silo; - $e = silo::get("/boot/$image", $o->{bootloader}); - } else { - require lilo; - $e = lilo::get("/boot/$image", $o->{bootloader}); - } + require bootloader; + $e = bootloader::get("/boot/$image", $o->{bootloader}); $e or next; $e->{kernel_or_dev} = $v; @@ -812,19 +797,15 @@ sub setupBootloaderBefore { $o->{bootloader}{root} ||= "/dev/$dev->{device}"; $o->{bootloader}{part_nb} ||= first($dev->{device} =~ /(\d+)/); } - } elsif (arch() =~ /^sparc/) { - require silo; - silo::init(); - silo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion($o)); } else { - require lilo; - lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion($o)); + require bootloader; + bootloader::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion($o)); if ($o->{miscellaneous}{profiles}) { - my $e = lilo::get_label("linux", $o->{bootloader}); + my $e = bootloader::get_label("linux", $o->{bootloader}); push @{$o->{bootloader}{entries}}, { %$e, label => "office", append => "$e->{append} prof=Office" }; $e->{append} .= " prof=Home"; } - lilo::suggest_floppy($o->{bootloader}) if $o->{security} <= 3; + bootloader::suggest_floppy($o->{bootloader}) if $o->{security} <= 3; $o->{bootloader}{keytable} ||= keyboard::keyboard2kmap($o->{keyboard}); } } @@ -856,11 +837,9 @@ sub setupBootloader($) { # output "$o->{prefix}/etc/aboot.conf", # map_index { "$::i:$b->{part_nb}$_ root=$b->{root} $b->{perImageAppend}\n" } # map { /$o->{prefix}(.*)/ } eval { glob_("$o->{prefix}/boot/vmlinux*") }; - } elsif (arch() =~ /^sparc/) { - silo::set_promvars($o->{fstab}, $o->{bootloader}); - silo::install($o->{prefix}, $o->{bootloader}); } else { - lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}); + require bootloader; + bootloader::install($o->{prefix}, $o->{bootloader}, $o->{fstab}, $o->{hds}); } } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 4e288b1ba..1307ae8b6 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -804,138 +804,6 @@ failures. Would you like to create a bootdisk for your system?"), } #------------------------------------------------------------------------------ -sub setupLILO { - my ($o, $more) = @_; - $o->{lnx4win} or any::setupBootloader($o, $o->{bootloader}, $o->{hds}, $o->{fstab}, $o->{security}, $o->{prefix}, $more) or return; - - eval { $o->SUPER::setupBootloader }; - if ($@) { - $o->ask_warn('', - [ _("Installation of LILO failed. The following error occured:"), - grep { !/^Warning:/ } cat_("$o->{prefix}/tmp/.error") ]); - unlink "$o->{prefix}/tmp/.error"; - die "already displayed"; - } -} - -#------------------------------------------------------------------------------ -sub setupSILO { - my ($o, $more) = @_; - my $b = $o->{bootloader}; - - if ($::beginner && $more >= 1) { - my @silo_install = (__("First sector of drive (MBR)"), __("First sector of boot partition")); - $o->set_help('setupBootloaderBeginner') unless $::isStandalone; #- no problem of translation for this one. - $b->{use_partition} = $o->ask_from_list_(_("SILO Installation"), - _("Where do you want to install the bootloader?"), - \@silo_install, $silo_install[$b->{use_partition}]); - } elsif ($more || !$::beginner) { - $o->set_help("setupSILOGeneral"); - - $::expert and $o->ask_yesorno('', _("Do you want to use SILO?"), 1) || return; - - my @silo_install_lang = (_("First sector of drive (MBR)"), _("First sector of boot partition")); - my $silo_install_lang = $silo_install_lang[$b->{use_partition}]; - my @l = ( -_("Bootloader installation") => { val => \$silo_install_lang, list => \@silo_install_lang, not_edit => 1 }, -_("Delay before booting default image") => \$b->{timeout}, -$o->{security} < 4 ? () : ( -_("Password") => { val => \$b->{password}, hidden => 1 }, -_("Password (again)") => { val => \$b->{password2}, hidden => 1 }, -_("Restrict command line options") => { val => \$b->{restricted}, type => "bool", text => _("restrict") }, -) - ); - - $o->ask_from_entries_refH('', _("SILO main options"), \@l, - complete => sub { -#- $o->{security} > 4 && length($b->{password}) < 6 and $o->ask_warn('', _("At this level of security, a password (and a good one) in silo is requested")), return 1; - $b->{restricted} && !$b->{password} and $o->ask_warn('', _("Option ``Restrict command line options'' is of no use without a password")), return 1; - $b->{password} eq $b->{password2} or !$b->{restricted} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return 1; - 0; - } - ) or return; - $b->{use_partition} = $silo_install_lang eq _("First sector of drive (MBR)") ? 0 : 1; - } - - until ($::beginner && $more <= 1) { - $o->set_help('setupSILOAddEntry'); - my $c = $o->ask_from_list_([''], -_("Here are the following entries in SILO. -You can add some more or change the existing ones."), - [ (sort @{[map { "$_->{label} ($_->{kernel_or_dev})" . ($b->{default} eq $_->{label} && " *") } @{$b->{entries}}]}), __("Add"), __("Done") ], - ); - $c eq "Done" and last; - - my ($e); - - if ($c eq "Add") { - my @labels = map { $_->{label} } @{$b->{entries}}; - my $prefix; - if ($o->ask_from_list_('', _("Which type of entry do you want to add?"), [ __("Linux"), __("Other OS (SunOS...)") ]) eq "Linux") { - $e = { type => 'image' }; - $prefix = "linux"; - } else { - $e = { type => 'other' }; - $prefix = "sunos"; - } - - $e->{label} = $prefix; - for (my $nb = 0; member($e->{label}, @labels); $nb++) { $e->{label} = "$prefix-$nb" } - } else { - $c =~ /(\S+)/; - ($e) = grep { $_->{label} eq $1 } @{$b->{entries}}; - } - my %old_e = %$e; - my $default = my $old_default = $e->{label} eq $b->{default}; - - my @l; - if ($e->{type} eq "image") { - @l = ( -_("Image") => { val => \$e->{kernel_or_dev}, list => [ eval { map { s/$o->{prefix}//; $_ } glob_("$o->{prefix}/boot/vmlinuz*") } ] }, -_("Partition") => { val => \$e->{partition}, list => [ map { ("$o->{prefix}/dev/$_->{device}" =~ /\D*(\d*)/)[0] || 1} @{$o->{fstab}} ], not_edit => !$::expert }, -_("Root") => { val => \$e->{root}, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert }, -_("Append") => \$e->{append}, -_("Initrd") => { val => \$e->{initrd}, list => [ eval { map { s/$o->{prefix}//; $_ } glob_("$o->{prefix}/boot/initrd*") } ] }, -_("Read-write") => { val => \$e->{'read-write'}, type => 'bool' } - ); - @l = @l[0..7] unless $::expert; - } else { - @l = ( -_("Root") => { val => \$e->{kernel_or_dev}, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert }, - ); - } - @l = ( -_("Label") => \$e->{label}, -@l, -_("Default") => { val => \$default, type => 'bool' }, - ); - - if ($o->ask_from_entries_refH($c eq "Add" ? '' : ['', _("Ok"), _("Remove entry")], - '', \@l, - complete => sub { - $e->{label} or $o->ask_warn('', _("Empty label not allowed")), return 1; - member($e->{label}, map { $_->{label} } grep { $_ != $e } @{$b->{entries}}) and $o->ask_warn('', _("This label is already in use")), return 1; - 0; - })) { - $b->{default} = $old_default || $default ? $default && $e->{label} : $b->{default}; - require silo; - silo::configure_entry($o->{prefix}, $e); - $c eq 'Add' and push @{$b->{entries}}, $e; - } else { - @{$b->{entries}} = grep { $_ != $e } @{$b->{entries}}; - } - } - eval { $o->SUPER::setupBootloader }; - if ($@) { - $o->ask_warn('', - [ _("Installation of SILO failed. The following error occured:"), - grep { !/^Warning:/ } cat_("$o->{prefix}/tmp/.error") ]); - unlink "$o->{prefix}/tmp/.error"; - die "already displayed"; - } -} - -#------------------------------------------------------------------------------ sub setupBootloaderBefore { my ($o) = @_; my $w = $o->wait_message('', _("Preparing bootloader")); @@ -944,7 +812,7 @@ sub setupBootloaderBefore { #------------------------------------------------------------------------------ sub setupBootloader { - my ($o) = @_; + my ($o, $more) = @_; if (arch() =~ /^alpha/) { $o->ask_yesorno('', _("Do you want to use aboot?"), 1) or return; catch_cdie { $o->SUPER::setupBootloader } sub { @@ -952,10 +820,17 @@ sub setupBootloader { _("Error installing aboot, try to force installation even if that destroys the first partition?")); }; - } elsif (arch() =~ /^sparc/) { - &setupSILO; } else { - &setupLILO; + $o->{lnx4win} or any::setupBootloader($o, $o->{bootloader}, $o->{hds}, $o->{fstab}, $o->{security}, $o->{prefix}, $more) or return; + + eval { $o->SUPER::setupBootloader }; + if ($@) { + $o->ask_warn('', + [ _("Installation of bootloader failed. The following error occured:"), + grep { !/^Warning:/ } cat_("$o->{prefix}/tmp/.error") ]); + unlink "$o->{prefix}/tmp/.error"; + die "already displayed"; + } } } diff --git a/perl-install/share/compssList b/perl-install/share/compssList index 06f898ef4..d7f8b5ece 100644 --- a/perl-install/share/compssList +++ b/perl-install/share/compssList @@ -520,25 +520,43 @@ kcmclock 0 0 0 kcmkdesu 80 0 70 kcmlaptop 32 0 20 kdbg 15 0 27 +kde2and1scripts 79 40 68 kde-doc-translation-fr -12 -20 -16 kde-themes 72 0 60 kde-themes-extra 24 0 24 kdeadmin 72 0 60 +kdeadmin2 72 0 60 kdebase 79 40 68 +kdebase2 79 40 68 kdegames 71 0 59 +kdegames2 71 0 59 kdegraphics 77 40 66 +kdegraphics2 77 40 66 kdelibs 0 0 0 +kdelibs2 0 0 0 kdelibs-devel 1 1 60 +kdelibs2-devel 1 1 60 +kdelibs2-sound 77 40 66 +kdelibs2-sound-devel 1 1 60 kdemultimedia 77 0 66 +kdemultimedia2 77 0 66 kdenetwork 72 0 60 +kdenetwork2 72 0 60 +kdepim2 72 0 60 +kdesdk2 72 0 60 kdesu 72 0 60 kdesupport 0 0 0 +kdesupport2 0 0 0 kdesupport-devel 0 0 15 +kdesupport2-devel 0 0 15 kdetoys 70 0 65 +kdetoys2 70 0 65 kdeutils 78 0 67 +kdeutils2 78 0 67 kdevelop 16 0 27 kdiff 72 0 60 kdiskcat 72 0 60 +kdoc2 72 0 60 kdpms 72 0 60 kernel 99 99 99 kernel-doc 5 50 65 @@ -567,6 +585,7 @@ kjumpingcube 70 0 65 kless 72 0 60 klilo 72 0 60 klyx 50 0 58 +klyx2 50 0 58 kmag 72 0 60 kmemmon 72 0 60 kmodbox 72 0 60 @@ -576,6 +595,7 @@ kmp3te 72 0 60 kmpg 72 0 60 knetload 72 0 60 knewmail 72 0 60 +koffice2 50 0 58 kon2 -12 -60 -15 korganizer 72 0 60 kover 72 0 60 @@ -599,6 +619,7 @@ kudzu 97 0 97 kudzu-devel 0 0 80 kuickshow 71 0 59 kvideogen 73 0 56 +kvirc2 72 0 56 kvoice 73 0 56 kvoicecontrol 73 0 56 kweather 72 0 59 diff --git a/perl-install/share/compssUsers b/perl-install/share/compssUsers index 8688a34b6..ed516b534 100644 --- a/perl-install/share/compssUsers +++ b/perl-install/share/compssUsers @@ -1,12 +1,78 @@ Graphics Manipulation Graphics -KDE +KDE 1 Graphical desktop/KDE +XFree86 +XFree86-75dpi-fonts +fonts-ttf-west_european +KDE 2 + +kde2and1scripts + +kdeadmin2 + +kdebase2 + +kdebase2-crypto + +kdegames2 + +kdegraphics2 + +kde-i18n2-Afrikaans + +kde-i18n2-Basque + +kde-i18n2-Brazil + +kde-i18n2-Breton + +kde-i18n2-British + +kde-i18n2-Bulgarian + +kde-i18n2-Catalan + +kde-i18n2-Chinese + +kde-i18n2-Croatian + +kde-i18n2-Czech + +kde-i18n2-Danish + +kde-i18n2-Dutch + +kde-i18n2-Esperanto + +kde-i18n2-Finnish + +kde-i18n2-French + +kde-i18n2-German + +kde-i18n2-Greek + +kde-i18n2-Hebrew + +kde-i18n2-Hungarian + +kde-i18n2-Italian + +kde-i18n2-Japanese + +kde-i18n2-Korean + +kde-i18n2-Lithuanian + +kde-i18n2-Macedonian + +kde-i18n2-Maori + +kde-i18n2-Norwegian + +kde-i18n2-Norwegian-Nynorsk + +kde-i18n2-Polish + +kde-i18n2-Portuguese + +kde-i18n2-Romanian + +kde-i18n2-Russian + +kde-i18n2-Serbian + +kde-i18n2-Slovak + +kde-i18n2-Slovenian + +kde-i18n2-Spanish + +kde-i18n2-Swedish + +kde-i18n2-Tamil + +kde-i18n2-Thai + +kde-i18n2-Turkish + +kde-i18n2-Ukrainian + +kde-i18n2-Walloon + +kdelibs2 + +kdelibs2-crypto + +kdelibs2-devel + +kdelibs2-sound + +kdelibs2-sound-devel + +kdemultimedia2 + +kdenetwork2 + +kdepim2 + +kdesdk2 + +kdesupport2 + +kdesupport2-devel + +kdetoys2 + +kdeutils2 + +kdoc2 + +klyx2 + +koffice2 + +kvirc2 + Gnome Graphical desktop/GNOME Graphical desktop/Sawmill |