summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-24 08:53:00 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-24 08:53:00 +0000
commit2d4133ff240757edb14cf10b83bbbabb274772f3 (patch)
treeadbdd0c33b5ff160ed5a1eb80cdb47837c7e0b45 /perl-install
parent0925f92586a8a200a632eece658b2a45b09c9cc8 (diff)
downloaddrakx-backup-do-not-use-2d4133ff240757edb14cf10b83bbbabb274772f3.tar
drakx-backup-do-not-use-2d4133ff240757edb14cf10b83bbbabb274772f3.tar.gz
drakx-backup-do-not-use-2d4133ff240757edb14cf10b83bbbabb274772f3.tar.bz2
drakx-backup-do-not-use-2d4133ff240757edb14cf10b83bbbabb274772f3.tar.xz
drakx-backup-do-not-use-2d4133ff240757edb14cf10b83bbbabb274772f3.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/common.pm10
-rw-r--r--perl-install/fsedit.pm2
-rw-r--r--perl-install/install2.pm3
-rw-r--r--perl-install/install_steps_interactive.pm22
-rw-r--r--perl-install/my_gtk.pm8
-rw-r--r--perl-install/pkgs.pm22
-rw-r--r--perl-install/share/themes-blue.rc2
-rw-r--r--perl-install/swap.pm2
8 files changed, 49 insertions, 22 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index e9e803c65..5094e0e48 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -183,12 +183,14 @@ sub catch_cdie(&&) {
&$f();
}
-sub cdie {
- $@ = join '', @_;
+sub cdie($;&) {
+ print "JJJJ\n";
+ my ($err, $f) = @_;
foreach (@common::cdie_catches) {
- &{$_}(@_) and return;
+ $@ = $err;
+ &{$_}(\$err) and return;
}
- die join '', @_;
+ die $err;
}
sub all {
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 8aa73fc2e..b7243c883 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -55,7 +55,7 @@ sub hds($$) {
eval { partition_table::read($hd, $flags->{clearall}) };
if ($@) {
- &cdie($@) unless $flags->{eraseBadPartitions};
+ cdie($@) unless $flags->{eraseBadPartitions};
partition_table_raw::zero_MBR($hd);
}
push @hds, $hd;
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index f8ff9c610..e8fee47f8 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -52,7 +52,7 @@ my @installSteps = (
setRootPassword => [ __("Set root password"), 1, 1, "formatPartitions" ],
addUser => [ __("Add a user"), 1, 1, "doInstallStep" ],
createBootdisk => [ __("Create bootdisk"), 1, 0, "doInstallStep" ],
- setupBootloader => [ __("Install bootloader"), 1, 1, "doInstallStep" ],
+ setupBootloader => [ __("Install bootloader"), 1, 1],#, "doInstallStep" ],
configureX => [ __("Configure X"), 1, 0, "formatPartitions" ],
exitInstall => [ __("Exit install"), 0, 0 ],
);
@@ -257,6 +257,7 @@ sub partitionDisks {
$o->ask_warn(_("Error"),
_("I can't read your partition table, it's too corrupted for me :(
I'll try to go on blanking bad partitions"));
+ $o->{partitioning}{auto_allocate} = 0;
1;
};
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 54812c39e..ceaa42380 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -579,15 +579,19 @@ _("Restrict command line options") => { val => \$b->{restricted}, type => "bool"
my $c = $o->ask_from_list_('',
_("Here are the following entries in lilo
You can add some more or change the existent ones."),
- [ (map_each{ "$::b->{label} ($::a)" . ($b->{default} eq $::b->{label} && " *") } %{$b->{entries}}), __("Add"), __("Done") ],
+ [ (sort @{[map_each { "$::b->{label} ($::a)" . ($b->{default} eq $::b->{label} && " *") } %{$b->{entries}}]}), __("Add"), __("Done") ],
);
$c eq "Done" and last;
- if ($c eq "Add") { }
+ my $e = {};
+ my $name = '';
- my ($name) = $c =~ /\((.*?)\)/;
- my $e = $b->{entries}{$name};
- my $default = $e->{label} eq $b->{default};
+ if ($c ne "Add") {
+ ($name) = $c =~ /\((.*?)\)/;
+ $e = $b->{entries}{$name};
+ }
+ my $old_name = $name;
+ my $default = my $old_default = $e->{label} eq $b->{default};
my @l;
if ($e->{type} eq "image") {
@@ -602,6 +606,7 @@ _("Read-write") => { val => \$e->{'read-write'}, type => 'bool' }
} else {
@l = (
_("Root") => { val => \$name, list => [ map { "/dev/$_->{device}" } @{$o->{fstab}} ], not_edit => !$::expert },
+_("Table") => { val => \$e->{table}, list => [ map { "/dev/$_->{device}" } @{$o->{hds}} ], not_edit => !$::expert },
_("Unsafe") => { val => \$e->{unsafe}, type => 'bool' }
);
@l = @l[0..1] if $::beginner;
@@ -618,7 +623,10 @@ _("Default") => { val => \$default, type => 'bool' },
[ grep_index { odd($::i) } @l ],
) or return;
- $b->{default} = $default && $e->{label};
+ $b->{default} = $old_default ^ $default ? $default && $e->{label} : $b->{default};
+
+ delete $b->{entries}{$old_name};
+ $b->{entries}{$name} = $e;
}
$o->SUPER::setupBootloader;
}
@@ -637,7 +645,7 @@ Remove the boot media and press return to reboot.
For information on fixes which are available for this release of Linux Mandrake,
consult the Errata available from http://www.linux-mandrake.com/.
Information on configuring your system is available in the post
-install chapter of the Official Linux Mandrake User's Guide."));
+install chapter of the Official Linux Mandrake User's Guide.")) if $alldone;
}
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index bd822f67b..c43c8f899 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -143,9 +143,9 @@ sub gtkcolor($$$) {
my ($r, $g, $b) = @_;
my $color = bless {}, 'Gtk::Gdk::Color';
- $color->red ($r << 8);
- $color->green($g << 8);
- $color->blue ($b << 8);
+ $color->red ($r);
+ $color->green($g);
+ $color->blue ($b);
gtkroot()->get_colormap->color_alloc($color);
}
@@ -289,7 +289,7 @@ sub _create_window($$) {
my $f = new Gtk::Frame(undef);
$w->set_name("Title");
- if ($::isStandalone || $o->{no_border}) {
+ if ($::isStandalone || $o->{no_border} || 1) {
gtkadd($w, $f);
} else {
my $t = new Gtk::Table(0, 0, 0);
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 2d50d8712..cc3dd166e 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -14,14 +14,26 @@ use c;
$size_correction_ratio = 1.04;
-1;
-
+my @skip_list = qw(
+XFree86-8514 XFree86-AGX XFree86-Mach32 XFree86-Mach64 XFree86-Mach8 XFree86-Mono
+XFree86-P9000 XFree86-S3 XFree86-S3V XFree86-SVGA XFree86-W32 XFree86-I128
+XFree86-Sun XFree86-SunMono XFree86-Sun24 XFree86-3DLabs kernel-BOOT
+MySQL MySQL_GPL mod_php3 midgard postfix metroess metrotmpl
+hackkernel hackkernel-BOOT hackkernel-fb hackkernel-headers
+hackkernel-pcmcia-cs hackkernel-smp hackkernel-smp-fb
+);#)
sub Package {
my ($packages, $name) = @_;
$packages->{$name} or log::l("unknown package `$name'") && undef;
}
+sub allpackages {
+ my ($packages) = @_;
+ my %skip_list; @skip_list{@skip_list} = ();
+ grep { !exists $skip_list{$_->{name}} } values %$packages;
+}
+
sub select($$;$) {
my ($packages, $p, $base) = @_;
my ($n, $v);
@@ -221,7 +233,9 @@ sub setSelectedFromCompssList($$$$$) {
defined $ind or log::l("unknown install class $install_class in compssList"), return;
my @values = map { $_->{values}[$ind] } @packages;
- sort { $values[$b] <=> $values[$a] } 0 .. $#packages;
+ sort { $values[$b] <=> $values[$a] }
+ grep { $packages[$_]->{values}[$ind] } #- remove null values (won't get installed)
+ 0 .. $#packages;
};
foreach (@places) {
my $p = $packages[$_];
@@ -320,3 +334,5 @@ sub install($$) {
$_->{installed} = 1 foreach @$toInstall;
}
+
+1;
diff --git a/perl-install/share/themes-blue.rc b/perl-install/share/themes-blue.rc
index 291c5be2e..ab2344f8b 100644
--- a/perl-install/share/themes-blue.rc
+++ b/perl-install/share/themes-blue.rc
@@ -35,7 +35,7 @@ style "button" = "any"
style "background"
{
- bg[NORMAL] = { 0, 0.67, 1.0 }
+ bg[NORMAL] = { 0, 0, 0.67 }
bg[PRELIGHT] = { 0, 0, 0.67 }
}
diff --git a/perl-install/swap.pm b/perl-install/swap.pm
index 4e32749b0..c14e67092 100644
--- a/perl-install/swap.pm
+++ b/perl-install/swap.pm
@@ -74,7 +74,7 @@ sub make($;$) {
$version = 1;
}
- $nbpages >= 10 or die "swap area needs to be at least " . 10 * $pagesize >> 10 . "kB";
+ $nbpages >= 10 or die "swap area needs to be at least " . (10 * $pagesize >> 10) . "kB";
-b $devicename or $checkBlocks = 0;
my $rdev = (stat $devicename)[6];# or log::l("stat of $devicename failed: $!");