summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-08 11:14:58 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-08 11:14:58 +0000
commitc7ce6282bc6360e3106818c301c550523f7a1f7a (patch)
tree0c122786d23df1141f4f048a8052d32f3010915d
parentfdc0e52cf8c9cfae833f45ec59d35d640a7ce6cc (diff)
downloaddrakx-c7ce6282bc6360e3106818c301c550523f7a1f7a.tar
drakx-c7ce6282bc6360e3106818c301c550523f7a1f7a.tar.gz
drakx-c7ce6282bc6360e3106818c301c550523f7a1f7a.tar.bz2
drakx-c7ce6282bc6360e3106818c301c550523f7a1f7a.tar.xz
drakx-c7ce6282bc6360e3106818c301c550523f7a1f7a.zip
no_comment
-rw-r--r--docs/TODO9
-rw-r--r--perl-install/Makefile4
-rw-r--r--perl-install/install_steps_interactive.pm4
-rw-r--r--perl-install/interactive.pm24
4 files changed, 28 insertions, 13 deletions
diff --git a/docs/TODO b/docs/TODO
index afe1b629c..522e10038 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -26,9 +26,6 @@ install2 sigsegv when leaving :(
verify the free space is big enough.
-ask realname first, then propose a username using the realname
-be able to add more than one normal user
-
loadFont sucks
trash on the screen when X first starts
@@ -72,7 +69,9 @@ timezone using a picture (pb: how to delimit zones)
suggested partition tables must be better foreach installClass
-Done_ZZZ:EEE:Pixel: dd the different xmodmaps for every languages (maybe gnome-core xmodmaps can help)
+the different xmodmaps for every languages (maybe gnome-core xmodmaps can help)
xmodmap needed even for english as the backspace is not what it should
-aha152x needs "insmod aha152x.o aha152x=0x140,11,7" \ No newline at end of file
+aha152x needs "insmod aha152x.o aha152x=0x140,11,7"
+
+have isofs in module.
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 7ae8bb947..f9a160426 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -78,7 +78,7 @@ install_pms: all
for i in $(PMS); do \
dest=$(DESTREP4PMS)/`dirname $$i`; \
install -d $$dest; \
- perl -ne 'print #unless /^use (diagnostics|vars|strict)/' $$i > $(DESTREP4PMS)/$$i; \
+ perl -ne 'print unless (/^=head/ .. /^=cut/) || /^\s*#-/ || /use (diagnostics|vars|strict)/' $$i > $(DESTREP4PMS)/$$i; \
done
rm $(DESTREP4PMS)/c/c.xs.pm
@@ -117,7 +117,7 @@ get_needed_files: $(SO_FILES)
d=`echo $(DEST)/$$i | sed 's/\/usr\/local\//\/usr\//'`; \
install -d `dirname $$d` && \
if (echo $$i | grep -q "\.pm"); then \
- perl -ne '$$_ =~ /^__END__/ and exit(0); print unless /\s*#-/' $$i > $$d; \
+ perl -pe '$$_ =~ /^__END__/ and exit(0);' $$i > $$d; \
else \
cp -f $$i $$d; \
strip $$d 2>/dev/null || true; \
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index e4bb09f97..b2b42036c 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -451,7 +451,9 @@ sub addUser($) {
{val => \$u->{shell}, list => \@shells, not_edit => !$::expert},
],
focus_out => sub {
- $u->{name} = lc first($u->{realname} =~ /(\w+)/) if $_[0] eq 0;
+ if ($_[0] eq 0) {
+ $u->{name} = lc first($u->{realname} =~ /((\w|-)+)/);
+ }
},
complete => sub {
$u->{password} eq $u->{password2} or $o->ask_warn('', [ _("You must enter the same password"), _("Please try again") ]), return (1,3);
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm
index cf22eae85..4cf9ef95b 100644
--- a/perl-install/interactive.pm
+++ b/perl-install/interactive.pm
@@ -44,27 +44,41 @@ sub new($) {
#-######################################################################################
sub ask_warn($$$) {
my ($o, $title, $message) = @_;
- ask_from_list($o, $title, $message, [ _("Ok") ]);
+ ask_from_list2($o, $title, $message, [ _("Ok") ]);
}
sub ask_yesorno($$$;$) {
my ($o, $title, $message, $def) = @_;
- ask_from_list_($o, $title, $message, [ __("Yes"), __("No") ], $def ? "No" : "Yes") eq "Yes";
+ ask_from_list2_($o, $title, $message, [ __("Yes"), __("No") ], $def ? "No" : "Yes") eq "Yes";
}
sub ask_okcancel($$$;$) {
my ($o, $title, $message, $def) = @_;
- ask_from_list_($o, $title, $message, [ __("Ok"), __("Cancel") ], $def ? "Cancel" : "Ok") eq "Ok";
+ ask_from_list2_($o, $title, $message, [ __("Ok"), __("Cancel") ], $def ? "Cancel" : "Ok") eq "Ok";
}
-sub ask_from_list_($$$$;$) {
+sub ask_from_list_ {
+ my ($o, $title, $message, $l, $def) = @_;
+ @$l == 0 and die;
+ @$l == 1 and return $l->[0];
+ goto &ask_from_list2_;
+}
+
+sub ask_from_list {
+ my ($o, $title, $message, $l, $def) = @_;
+ @$l == 0 and die;
+ @$l == 1 and return $l->[0];
+ goto &ask_from_list2;
+}
+
+sub ask_from_list2_($$$$;$) {
my ($o, $title, $message, $l, $def) = @_;
untranslate(
ask_from_list($o, $title, $message, [ map { translate($_) } @$l ], translate($def)),
@$l);
}
-sub ask_from_list($$$$;$) {
+sub ask_from_list2($$$$;$) {
my ($o, $title, $message, $l, $def) = @_;
$message = ref $message ? $message : [ $message ];