summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-08 12:50:22 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-08 12:50:22 +0000
commit477f9e81cb3aa78829210942e8185e8146c6cd5e (patch)
tree9d8a4134a0c54dd54fbf623adff5d039f7a844c6 /perl-install
parent38c803288507d86bfd04daf2f7a4b656f2c7de7b (diff)
downloaddrakx-backup-do-not-use-477f9e81cb3aa78829210942e8185e8146c6cd5e.tar
drakx-backup-do-not-use-477f9e81cb3aa78829210942e8185e8146c6cd5e.tar.gz
drakx-backup-do-not-use-477f9e81cb3aa78829210942e8185e8146c6cd5e.tar.bz2
drakx-backup-do-not-use-477f9e81cb3aa78829210942e8185e8146c6cd5e.tar.xz
drakx-backup-do-not-use-477f9e81cb3aa78829210942e8185e8146c6cd5e.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Makefile2
-rw-r--r--perl-install/Xconfigurator.pm2
-rw-r--r--perl-install/commands.pm5
-rw-r--r--perl-install/common.pm2
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/install_steps.pm6
-rw-r--r--perl-install/install_steps_interactive.pm25
-rw-r--r--perl-install/interactive_gtk.pm2
-rw-r--r--perl-install/share/list2
9 files changed, 27 insertions, 21 deletions
diff --git a/perl-install/Makefile b/perl-install/Makefile
index f7d892a50..54b0623c1 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -133,7 +133,7 @@ get_needed_files: $(DIRS)
cd $(DEST)/usr/bin ; mv insmod insmod_
rmdir $(DEST)/bin $(DEST)/sbin
- ln -sf zsh $(DEST)/usr/bin/sh
+ ln -sf ash $(DEST)/usr/bin/sh
tar xfy locales.tar.bz2 -C $(DEST)
# DEST=$(DEST) perl -I. -MForMakefile -e 'locale()'
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index e1acec491..2c79b6b09 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -388,7 +388,7 @@ sub autoDefaultDepth($$) {
sub autoDefaultResolution(;$) {
my $size = round(shift || 14); #- assume a small monitor (size is in inch)
$monitorSize2resolution[$size] ||
- $monitorSize2resolution[$#monitorSize2resolution]; #- no corresponding resolution for this size. It means a big monitor, take biggest we have
+ $monitorSize2resolution[-1]; #- no corresponding resolution for this size. It means a big monitor, take biggest we have
}
sub chooseResolutionsGtk($$;$) {
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 0323f0f02..c6695603c 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -511,10 +511,11 @@ sub install_cpio($$) {
eval { rm("-r", $dir) };
mkdir $dir, 0755;
require 'run_program.pm';
- run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*") and return "$dir/$name";
+ run_program::run("cd $dir ; bzip2 -cd $cpio | cpio -id $name $name/*");
#- not found, cache result
- $cached_failed_install_cpio{"$dir $name"} = 1;
+ $cached_failed_install_cpio{"$dir $name"} = ! -e "$dir/$name";
+ "$dir/$name";
}
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 8cb221afb..de552b7c8 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -47,7 +47,7 @@ sub sign { $_[0] <=> 0 }
sub product { fold_left { $a * $b } @_ }
sub first { $_[0] }
sub second { $_[1] }
-sub top { $_[$#_] }
+sub top { $_[-1] }
sub uniq { my %l; @l{@_} = (); keys %l }
sub to_int { $_[0] =~ /(\d*)/; $1 }
sub to_float { $_[0] =~ /(\d*(\.\d*)?)/; $1 }
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 8df3a9f49..74d653756 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -328,7 +328,7 @@ sub formatPartitions {
sub choosePackages {
$o->setPackages if $_[1] == 1;
$o->selectPackagesToUpgrade($o) if $o->{isUpgrade} && $_[1] == 1;
- $o->choosePackages($o->{packages}, $o->{compss}, $o->{compssUsers});
+ $o->choosePackages($o->{packages}, $o->{compss}, $o->{compssUsers}, $_[1] == 1);
$o->{packages}{$_}{selected} = 1 foreach @{$o->{base}};
}
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 8bcc53898..b2041a11c 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -193,6 +193,12 @@ sub beforeInstallPackages {
sub installPackages($$) {
my ($o, $packages) = @_;
+
+ while (my ($k, $v) = each %{$o->{compssUsersChoice}}) {
+ $v or next;
+ pkgs::select($packages, $_) foreach @{$o->{compssUsers}{$k}};
+ }
+
#- hack to ensure proper ordering for installation of packages.
my @firstToInstall = qw(basesystem sed);
my %firstInstalled;
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 2b207cbe3..d1c5338b4 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -232,15 +232,12 @@ sub selectPackagesToUpgrade {
sub choosePackages {
my ($o, $packages, $compss, $compssUsers) = @_;
my %s;
-
+
$o->ask_many_from_list_ref('',
_("Package Group Selection"),
[ keys %$compssUsers ],
- [ map { \$s{$_} } keys %$compssUsers ]
- ) or return;
- foreach (grep { $s{$_} } keys %s) {
- pkgs::select($o->{packages}, $_) foreach @{$compssUsers->{$_}};
- }
+ [ map { \$o->{compssUsersChoice}{$_} } keys %$compssUsers ]
+ );
}
#------------------------------------------------------------------------------
sub configureNetwork($) {
@@ -481,7 +478,7 @@ applicable user name, password, and workgroup information."),
return 0;
},
);
- install_any::pkg_install($o, 'samba') unless $::testing;
+ install_any::pkg_install($o, 'samba');
} elsif ($o->{printer}{TYPE} eq "NCP") {
return if !$o->ask_from_entries_ref(_("NetWare Printer Options"),
_("To print to a NetWare printer, you need to provide the
@@ -493,7 +490,7 @@ wish to access and any applicable user name and password."),
[\$o->{printer}{NCPHOST}, \$o->{printer}{NCPQUEUE},
\$o->{printer}{NCPUSER}, {val => \$o->{printer}{NCPPASSWD}, hidden => 1}],
);
- install_any::pkg_install($o, 'ncpfs') unless $::testing;
+ install_any::pkg_install($o, 'ncpfs');
}
my $action;
@@ -534,10 +531,10 @@ wish to access and any applicable user name and password."),
$o->ask_from_entries_refH('', _("Printer options"), [
_("Paper Size") => { val => \$o->{printer}{PAPERSIZE}, type => 'list', , not_edit => !$::expert, list => \@printer::papersize_type },
_("Eject page after job?") => { val => \$o->{printer}{AUTOSENDEOF}, type => 'bool' },
-$#list_res > 0 ? (
+@list_res > 1 ? (
_("Resolution") => { val => \$o->{printer}{RESOLUTION}, type => 'list', , not_edit => !$::expert, list => \@res } ) : (),
_("Fix stair-stepping text?") => { val => \$o->{printer}{CRLF}, type => "bool" },
-$#list_col > 0 ? (
+@list_col > 1 ? (
$is_uniprint ? (
_("Uniprint driver options") => { val => \$o->{printer}{BITSPERPIXEL}, type => 'list', , not_edit => !$::expert, list => \@col } ) : (
_("Color depth options") => { val => \$o->{printer}{BITSPERPIXEL}, type => 'list', , not_edit => !$::expert, list => \@col } ), ) : ()
@@ -592,8 +589,9 @@ _("Password (again)") => { val => \$sup->{password2}, hidden => 1 },
$o->{installClass} eq "server" || $::expert ? (
_("Use shadow file") => { val => \$o->{authentification}{shadow}, type => 'bool', text => _("shadow") },
_("Use MD5 passwords") => { val => \$o->{authentification}{md5}, type => 'bool', text => _("MD5") },
- ) : (), $::beginner ? () :
-_("Use NIS") => { val => \$o->{authentification}{NIS}, type => 'bool', text => _("yellow pages") }
+ ) : (), $::beginner ? () : (
+_("Use NIS") => { val => \$o->{authentification}{NIS}, type => 'bool', text => _("yellow pages") },
+ )
],
complete => sub {
$sup->{password} eq $sup->{password2} or $o->ask_warn('', [ _("The passwords do not match"), _("Please try again") ]), return (1,1);
@@ -634,8 +632,9 @@ sub addUser($) {
$o->{security} < 2 ? () : (
_("Password") => {val => \$u->{password}, hidden => 1},
_("Password (again)") => {val => \$u->{password2}, hidden => 1},
- ), $::beginner ? () :
+ ), $::beginner ? () : (
_("Shell") => {val => \$u->{shell}, list => \@shells, not_edit => !$::expert}
+ ),
],
focus_out => sub {
if ($_[0] eq 0) {
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index ced261891..fb4d5488c 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -54,7 +54,7 @@ sub ask_many_from_list_refW($$$$$) {
my ($o, $title, $messages, $list, $val) = @_;
my $w = my_gtk->new('', %$o);
my $box = gtkpack(new Gtk::VBox(0,0),
- map {
+ map_index {
my $i = $::i;
my $o = Gtk::CheckButton->new($_);
$o->set_active(${$val->[$i]});
diff --git a/perl-install/share/list b/perl-install/share/list
index cda42dfca..fd8ce8fca 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -1,3 +1,4 @@
+/bin/ash
/bin/cpio
/lib/libnss_nis.so.2
/lib/libnss_files.so.2
@@ -11,7 +12,6 @@
/sbin/mke2fs
/usr/bin/bzip2
/usr/bin/perl
-/usr/bin/zsh
/usr/lib/libimlib-png.so
/usr/lib/gtk/themes/engines/libpixmap.so
/usr/lib/gtk/themes/engines/libpixmap.la