summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-23 17:30:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-23 17:30:36 +0000
commited76955e239d467e996ea3d20e8ae14c13db0253 (patch)
treef2166989b89a195fb7c55ec83bde252793f8d106 /perl-install
parent70e35bb3512a6b6022d784ccfcc752148d7cece7 (diff)
downloaddrakx-backup-do-not-use-ed76955e239d467e996ea3d20e8ae14c13db0253.tar
drakx-backup-do-not-use-ed76955e239d467e996ea3d20e8ae14c13db0253.tar.gz
drakx-backup-do-not-use-ed76955e239d467e996ea3d20e8ae14c13db0253.tar.bz2
drakx-backup-do-not-use-ed76955e239d467e996ea3d20e8ae14c13db0253.tar.xz
drakx-backup-do-not-use-ed76955e239d467e996ea3d20e8ae14c13db0253.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog11
-rw-r--r--perl-install/c/stuff.xs.pm5
-rw-r--r--perl-install/install_steps_gtk.pm27
-rw-r--r--perl-install/install_steps_interactive.pm8
-rw-r--r--perl-install/install_steps_newt.pm22
-rw-r--r--perl-install/mouse.pm2
-rw-r--r--perl-install/pkgs.pm2
7 files changed, 64 insertions, 13 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index d828ede61..b9b7c0cad 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,14 @@
+2000-03-23 Pixel <pixel@mandrakesoft.com>
+
+ * install_steps_gtk.pm (selectMouse): added, takes care of telling
+ the X server if the user changed the mouse type. Only done if
+ a serial mouse is chosen.
+
+ * install_steps_newt.pm (doPartitionDisks): add a call to
+
+ * mouse.pm (write): added "device=" in etc/sysconfig/mouse for
+ devfs (it looses the symlink /dev/mouse)
+
2000-03-22 Pixel <pixel@mandrakesoft.com>
* pci_probing/pcitable: replace Server:Rage128 by proper XFree entry
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index d8395dc66..6b1fdd732 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -80,16 +80,15 @@ Xtest(display)
RETVAL
void
-setMouse(display, type)
+setMouseMicrosoft(display)
char *display
- int type
CODE:
{
XF86MiscMouseSettings mseinfo;
Display *d = XOpenDisplay(display);
if (d) {
if (XF86MiscGetMouseSettings(d, &mseinfo) == True) {
- mseinfo.type = type;
+ mseinfo.type = MTYPE_MICROSOFT;
mseinfo.flags = 128;
XF86MiscSetMouseSettings(d, &mseinfo);
XFlush(d);
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index b7ce8b00c..33b5997de 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -258,6 +258,21 @@ sub selectLanguage {
}
#------------------------------------------------------------------------------
+sub selectMouse {
+ my ($o, $force) = @_;
+ my $old_dev = $o->{mouse}{device};
+ $o->SUPER::selectMouse($force);
+
+ my $dev = $o->{mouse}{device};
+ if ($old_dev ne $dev && $dev =~ /ttyS/) {
+ log::l("telling X server to use another mouse");
+ eval { commands::modprobe("serial") };
+ symlinkf($dev, "/dev/mouse");
+ c::setMouseMicrosoft($ENV{DISPLAY});
+ }
+}
+
+#------------------------------------------------------------------------------
sub doPartitionDisks($$) {
my ($o, $hds, $raid) = @_;
@@ -494,6 +509,10 @@ sub installPackages {
),
$text,
$progress_total,
+ '',
+ gtkadd(create_hbox(),
+ gtksignal_connect(new Gtk::Button(_("Cancel")),
+ clicked => sub { $pkgs::cancel_install = 1 })),
)));
$msg->set(_("Preparing installation"));
$w->sync;
@@ -563,6 +582,10 @@ _("There was an error ordering packages:"), $1, _("Go on anyway?") ], 1) and ret
}
0;
};
+ if ($pkgs::cancel_install) {
+ $pkgs::cancel_install = 0;
+ die "setstep choosePackages\n";
+ }
$w->destroy;
}
@@ -773,6 +796,8 @@ sub init_sizes() {
sub createXconf($$$) {
my ($file, $mouse_type, $mouse_dev, $wacom_dev) = @_;
+ symlinkf($mouse_dev, "/dev/mouse");
+
my $wacom;
if ($wacom_dev) {
$wacom_dev = devices::make($wacom_dev);
@@ -835,7 +860,7 @@ EndSection
Section "Pointer"
Protocol "$mouse_type"
- Device "/dev/$mouse_dev"
+ Device "/dev/mouse"
Emulate3Buttons
Emulate3Timeout 50
EndSection
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index e736afb74..beb193878 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -137,10 +137,8 @@ sub selectInstallClass($@) {
sub selectMouse {
my ($o, $force) = @_;
- my $name = $o->{mouse}{FULLNAME};
- if (!$name || $::expert || $force) {
- $name ||= "Generic Mouse (serial)";
- $name = $o->ask_from_list_('', _("What is the type of your mouse?"), [ mouse::names() ], $name);
+ if ($o->{mouse}{unsafe} || !$::beginner || $force) {
+ my $name = $o->ask_from_list_('', _("What is the type of your mouse?"), [ mouse::names() ], $o->{mouse}{FULLNAME});
$o->{mouse} = mouse::name2mouse($name);
}
$o->{mouse}{XEMU3} = 'yes' if $o->{mouse}{nbuttons} < 3; #- if $o->{mouse}{nbuttons} < 3 && $o->ask_yesorno('', _("Emulate third button?"), 1);
@@ -279,7 +277,7 @@ _("You need %dMB for a full install of the groups you selected.
You can go on anyway, but be warned that you won't get all packages", $max_size / sqr(1024)), 1) or goto &choosePackages
}
- my $size2install = $::beginner ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, min($max_size, $available * 0.9)) or goto &choosePackages;
+ my $size2install = $::beginner && $first_time ? $available * 0.7 : $o->chooseSizeToInstall($packages, $min_size, min($max_size, $available * 0.9)) or goto &choosePackages;
($o->{packages_}{ind}) =
pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, $size2install, $o->{installClass});
diff --git a/perl-install/install_steps_newt.pm b/perl-install/install_steps_newt.pm
index b35d47e9d..015de1c05 100644
--- a/perl-install/install_steps_newt.pm
+++ b/perl-install/install_steps_newt.pm
@@ -11,6 +11,8 @@ use vars qw(@ISA);
#-######################################################################################
use install_steps_interactive;
use interactive_newt;
+use install_any;
+use devices;
use common qw(:common);
my $banner = __();
@@ -29,11 +31,27 @@ sub new($$) {
banner('');
Newt::PushHelpLine(_(" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next screen "));
- $o->{partitioning}{readonly} = 1; #- needed til diskdrake is graphic only...
-
(bless {}, ref $type || $type)->SUPER::new($o);
}
+sub doPartitionDisks($$) {
+ my ($o, $hds, $raid) = @_;
+
+ Newt::Suspend();
+ foreach (@$hds) {
+ print
+_("You can now partition your %s hard drive
+When you are done, don't forget to save using `w'", $_->{device});
+ print "\n\n";
+ my $pid = fork or exec "fdisk", devices::make($_->{device});
+ waitpid($pid, 0);
+ }
+ Newt::Resume();
+
+ install_any::getHds($o);
+ $o->ask_mntpoint_s($o->{fstab});
+}
+
sub enteringStep {
my ($o, $step) = @_;
$o->SUPER::enteringStep($step);
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 0e8c18d7e..5bb5b5e8b 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -93,7 +93,7 @@ sub read($) {
sub write($;$) {
my ($prefix, $mouse) = @_;
local $mouse->{FULLNAME} = qq("$mouse->{FULLNAME}");
- setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3));
+ setVarsInSh("$prefix/etc/sysconfig/mouse", $mouse, qw(MOUSETYPE XMOUSETYPE FULLNAME XEMU3 device));
symlinkf $mouse->{device}, "$prefix/dev/mouse" or log::l("creating $prefix/dev/mouse symlink failed");
}
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0f8a5bd52..3be8ece68 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -821,7 +821,7 @@ sub install($$$;$$) {
c::rpmdbClose($db);
die "installation of rpms failed:\n ", join("\n ", @probs);
}
- } while ($nb > 0);
+ } while ($nb > 0 && !$pkgs::cancel_install);
c::rpmdbClose($db);
log::l("rpm database closed");