summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-14 09:25:40 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-14 09:25:40 +0000
commite2cbffc6422fc59ee624c2c399e79109c21c7cc4 (patch)
tree8bc16a2c6a23da765f7bd7ca08b5ad5dc676b6c5 /perl-install
parent9266168309a593e84c47cc59edb2a6ccd49e4686 (diff)
downloaddrakx-backup-do-not-use-e2cbffc6422fc59ee624c2c399e79109c21c7cc4.tar
drakx-backup-do-not-use-e2cbffc6422fc59ee624c2c399e79109c21c7cc4.tar.gz
drakx-backup-do-not-use-e2cbffc6422fc59ee624c2c399e79109c21c7cc4.tar.bz2
drakx-backup-do-not-use-e2cbffc6422fc59ee624c2c399e79109c21c7cc4.tar.xz
drakx-backup-do-not-use-e2cbffc6422fc59ee624c2c399e79109c21c7cc4.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog26
-rw-r--r--perl-install/detect_devices.pm5
-rw-r--r--perl-install/fs.pm45
-rw-r--r--perl-install/fsedit.pm8
-rw-r--r--perl-install/ftp.pm2
-rw-r--r--perl-install/http.pm2
-rw-r--r--perl-install/install2.pm12
-rw-r--r--perl-install/install_any.pm4
-rw-r--r--perl-install/install_steps.pm9
-rw-r--r--perl-install/install_steps_gtk.pm2
-rw-r--r--perl-install/install_steps_interactive.pm9
-rw-r--r--perl-install/interactive_gtk.pm19
-rw-r--r--perl-install/keyboard.pm2
-rw-r--r--perl-install/loopback.pm29
-rw-r--r--perl-install/modules.pm2
-rw-r--r--perl-install/mouse.pm17
-rw-r--r--perl-install/my_gtk.pm2
-rw-r--r--perl-install/partition_table_raw.pm2
-rw-r--r--perl-install/pkgs.pm14
-rw-r--r--perl-install/raid.pm3
-rw-r--r--perl-install/timezone.pm1
21 files changed, 165 insertions, 50 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 7237ea35d..042d899e3 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,21 @@
+2000-03-13 Pixel <pixel@mandrakesoft.com>
+
+ * detect_devices.pm (floppies): don't return hash but the device name
+
+2000-03-12 Pixel <pixel@mandrakesoft.com>
+
+ * install_steps_interactive.pm (choosePackages): compute the
+ max_size very simply (sum of all package sizes), otherwise too costly
+
+ * pkgs.pm (install): call cleanHeaders at the end
+ * pkgs.pm (cleanHeaders): created
+
+ * install2.pm (miscellaneous): /etc/msec/init.sh is now
+ /usr/sbin/msec (yoann thanks for not telling :pp)
+
+ * pkgs.pm (install): remove the $prefix of mountpoints for not
+ enough room to install error message
+
2000-03-13 François Pons <fpons@mandrakesoft.com>
* pkgs.pm, install_any.pm: small correction for multiple media
@@ -11,6 +29,14 @@
2000-03-11 Pixel <pixel@mandrakesoft.com>
+ * my_gtk.pm (_create_window): add callback on focus to
+ ensure_focus. The result is no more 3 focus states with 2 buttons.
+
+ * interactive_gtk.pm (ask_from_treelistW): better keyboard handling
+
+ * raid.pm (make): check the result of mkraid. Suggest raidtools
+ are missing in standalone diskdrake
+
* devices.pm (set_loop): created, searches for an available
loopback and sets the file to it
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 484a4dfe8..2be192599 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -50,9 +50,10 @@ sub cdroms() {
@l;
}
sub floppies() {
- (grep { tryOpen($_) } qw(fd0 fd1)),
- (grep { $_->{type} eq 'fd' } get());
+ my @ide = map { $_->{device} } grep { $_->{type} eq 'fd' } get() and modules::load("ide-floppy");
+ (grep { tryOpen($_) } qw(fd0 fd1)), @ide;
}
+#- example ls120, model = "LS-120 SLIM 02 UHD Floppy"
sub isZipDrive() { $_[0]->{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
#-sub isJazzDrive() { $_[0]->{info} =~ /JAZZ?\s+/ } #- untested.
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 7fc15dcec..855fb5fd0 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -135,12 +135,16 @@ sub format_part {
sub formatMount_part {
my ($part, $raid, $fstab, $prefix, $callback) = @_;
- if (my $p = up_mount_point($part->{mntpoint}, $fstab)) {
- formatMount_part($p, $raid, $fstab, $prefix, $callback);
- }
+ log::l("formatMount_part: $part->{mntpoint}\n");
+
if (isLoopback($part)) {
formatMount_part($part->{device}, $raid, $fstab, $prefix, $callback);
}
+ if (my $p = up_mount_point($part->{mntpoint}, $fstab)) {
+ formatMount_part($p, $raid, $fstab, $prefix, $callback) unless loopback::carryRootLoopback($part);
+ }
+
+ log::l("formatMount_part: $part->{mntpoint} really\n");
if ($part->{toFormat}) {
$callback->($part) if $callback;
@@ -153,6 +157,9 @@ sub formatMount_all {
my ($raid, $fstab, $prefix, $callback) = @_;
formatMount_part($_, $raid, $fstab, $prefix, $callback)
foreach sort { isLoopback($a) ? 1 : -1 } grep { $_->{mntpoint} } @$fstab;
+
+ #- ensure the link is there
+ loopback::carryRootCreateSymlink($_, $prefix) foreach @$fstab;
}
sub mount($$$;$) {
@@ -202,7 +209,10 @@ sub umount($) {
sub mount_part($;$$) {
my ($part, $prefix, $rdonly) = @_;
- $part->{isMounted} and return;
+ #- root carrier's link can't be mounted
+ loopback::carryRootCreateSymlink($part, $prefix);
+
+ return if $part->{isMounted};
unless ($::testing) {
if (isSwap($part)) {
@@ -210,11 +220,15 @@ sub mount_part($;$$) {
} else {
$part->{mntpoint} or die "missing mount point";
- eval { modules::load('loop') } if isLoopback($part);
- $part->{real_device} = devices::set_loop($prefix . loopback::file($part)) || die if isLoopback($part);
- local $part->{device} = $part->{real_device} if isLoopback($part);
-
- mount(devices::make($part->{device}), ($prefix || '') . $part->{mntpoint}, type2fs($part->{type}), $rdonly);
+ my $dev = $part->{device};
+ my $mntpoint = ($prefix || '') . $part->{mntpoint};
+ if (isLoopback($part)) {
+ eval { modules::load('loop') };
+ $dev = $part->{real_device} = devices::set_loop($prefix . loopback::file($part)) || die;
+ } elsif (loopback::carryRootLoopback($part)) {
+ $mntpoint = "/initrd/loopfs";
+ }
+ mount(devices::make($dev), $mntpoint, type2fs($part->{type}), $rdonly);
}
}
$part->{isMounted} = $part->{isFormatted} = 1; #- assume that if mount works, partition is formatted
@@ -228,6 +242,8 @@ sub umount_part($;$) {
unless ($::testing) {
if (isSwap($part)) {
swap::swapoff($part->{device});
+ } elsif (loopback::carryRootLoopback($part)) {
+ umount("/initrd/loopfs");
} else {
umount(($prefix || '') . $part->{mntpoint} || devices::make($part->{device}));
c::del_loop(delete $part->{real_device}) if isLoopback($part);
@@ -321,10 +337,15 @@ sub write_fstab($;$$) {
isNfs($_) and $dir = '', $options = $_->{options} || 'ro,nosuid,rsize=8192,wsize=8192';
isFat($_) and $options = $_->{options} || "user,exec";
- my $dev = isLoopback($_) ? loopback::file($_) :
- $_->{device} =~ /^\// ? $_->{device} : "$dir$_->{device}";
+ my $dev = isLoopback($_) ?
+ ($_->{mntpoint} eq '/' ? "/initrd/loopfs$_->{loopback_file}" : loopback::file($_)) :
+ ($_->{device} =~ /^\// ? $_->{device} : "$dir$_->{device}");
- add_options($options, "loop") if isLoopback($_);
+ local $_->{mntpoint} = do {
+ $passno = 0;
+ "/initrd/loopfs" } if loopback::carryRootLoopback($_);
+
+ add_options($options, "loop") if isLoopback($_) && !isSwap($_); #- no need for loop option for swap files
#- keep in mind the new line for fstab.
@new{($_->{mntpoint}, $dev)} = undef;
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index e8b045d04..e45883fd9 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -28,6 +28,7 @@ arch() =~ /^sparc/ ? (
{ mntpoint => "/", size => 50 << 11, type => 0x83, ratio => 1, maxsize => 300 << 11 },
{ mntpoint => "swap", size => 30 << 11, type => 0x82, ratio => 1, maxsize => 250 << 11 },
),
+ { mntpoint => "/boot", size => 16 << 11, type => 0x83, ratio => 1, maxsize => 30 << 11 },
{ mntpoint => "/usr", size => 200 << 11, type => 0x83, ratio => 6, maxsize =>1500 << 11 },
{ mntpoint => "/home", size => 50 << 11, type => 0x83, ratio => 3 },
{ mntpoint => "/var", size => 200 << 11, type => 0x83, ratio => 1, maxsize =>1000 << 11 },
@@ -232,6 +233,8 @@ sub has_mntpoint($$) {
sub check_mntpoint {
my ($mntpoint, $hd, $part, $hds, $loopbackDevice) = @_;
+ ref $loopbackDevice or undef $loopbackDevice;
+
$mntpoint eq '' || isSwap($part) || isRAID($part) and return;
local $_ = $mntpoint;
@@ -248,13 +251,14 @@ sub check_mntpoint {
push @seen, $p->{mntpoint} || return;
@seen > 1 && $p->{mntpoint} eq $mntpoint and die _("Circular mounts %s\n", join(", ", @seen));
if (my $part = fs::up_mount_point($p->{mntpoint}, $fstab)) {
- $check->($part, @seen);
+ #- '/' carrier is a special case, it will be mounted first
+ $check->($part, @seen) unless loopback::carryRootLoopback($p);
}
if (isLoopback($p)) {
$check->($p->{device}, @seen);
}
};
- $check->($fake_part);
+ $check->($fake_part) unless $mntpoint eq '/' && $loopbackDevice; #- '/' is a special case, no loop check
#- if ($part->{start} + $part->{size} > 1024 * $hd->cylinder_size() && arch() =~ /i386/) {
#- die "/boot ending on cylinder > 1024" if $mntpoint eq "/boot";
diff --git a/perl-install/ftp.pm b/perl-install/ftp.pm
index 350619c23..d1a7ac241 100644
--- a/perl-install/ftp.pm
+++ b/perl-install/ftp.pm
@@ -50,7 +50,7 @@ sub new {
wantarray ? @l : $l[0];
}
-sub getFile($) {
+sub getFile {
my $f = shift;
my ($ftp, $retr) = new(@_ ? @_ : fromEnv);
$$retr->close if $$retr;
diff --git a/perl-install/http.pm b/perl-install/http.pm
index 9da302513..8797b9e39 100644
--- a/perl-install/http.pm
+++ b/perl-install/http.pm
@@ -8,7 +8,7 @@ use network;
my $sock;
-sub getFile($) {
+sub getFile {
local($^W) = 0;
my ($host, $port, $path) = $ENV{URLPREFIX} =~ m,^http://([^/:]+)(?::(\d+))?(/\S*)?$,;
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index e658953dd..8e7390bca 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -58,7 +58,7 @@ my (%installSteps, @orderedInstallSteps);
configurePrinter => [ __("Configure printer"), 1, 0, '', "doInstallStep" ],
setRootPassword => [ __("Set root password"), 1, 1, '', "formatPartitions" ],
addUser => [ __("Add a user"), 1, 1, '', "doInstallStep" ],
-arch() =~ /alpha/ ? (
+arch() !~ /alpha/ ? (
createBootdisk => [ __("Create a bootdisk"), 1, 0, '', "doInstallStep" ],
) : (),
setupBootloader => [ __("Install bootloader"), 1, 1, '', "doInstallStep" ],
@@ -372,7 +372,7 @@ sub doInstallStep {
$o->beforeInstallPackages;
$o->installPackages($o->{packages});
- $o->afterInstallPackages;
+ $o->afterInstallPackages;
}
#------------------------------------------------------------------------------
sub miscellaneous {
@@ -386,10 +386,16 @@ sub miscellaneous {
TYPE => $o->{installClass},
SECURITY => $o->{security},
});
+
+ setVarsInSh("$o->{prefix}/etc/sysconfig/usb", {
+ MOUSE => bool2yesno($o->{mouse}{device} eq "usbmouse"),
+ KEYBOARD => bool2yesno(int grep { /^keybdev\.c: Adding keyboard/ } detect_devices::syslog()),
+ });
+
install_any::fsck_option();
local $ENV{LILO_PASSWORD} = $o->{lilo}{password};
- run_program::rooted($o->{prefix}, "/etc/security/msec/init.sh", $o->{security});
+ run_program::rooted($o->{prefix}, "/usr/sbin/msec", $o->{security});
} 'doInstallStep';
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 1b908e062..f4840f637 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -82,7 +82,7 @@ sub errorOpeningFile($) {
return;
}
-sub getFile($) {
+sub getFile {
local $^W = 0;
if ($::o->{method} && $::o->{method} eq "ftp") {
require ftp;
@@ -91,7 +91,7 @@ sub getFile($) {
require http;
*install_any::getFile = sub { http::getFile($_[0]) or errorOpeningFile($_[0]) };
} else {
- *install_any::getFile = sub($) {
+ *install_any::getFile = sub {
open getFile, "/tmp/rhimage/" . relGetFile($_[0]) or return errorOpeningFile($_[0]);
*getFile;
};
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index a867b8155..146447a0a 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -240,6 +240,14 @@ sub installPackages($$) { #- complete REWORK, TODO and TOCHECK!
sub afterInstallPackages($) {
my ($o) = @_;
+ -x "$o->{prefix}/usr/bin/dumpkeys" or die
+"Some important packages didn't get installed properly.
+
+Please switch to console 2 (using ctrl-alt-f2)
+and look at the log file /tmp/ddebug.log
+
+Consoles 1,3,4,7 may also contain interesting information";
+
pkgs::done_db();
#- why not? cuz weather is nice today :-) [pixel]
@@ -642,6 +650,7 @@ sub setupBootloader($) {
silo::install($o->{prefix}, $o->{bootloader});
} else {
lilo::install_grub($o->{prefix}, $o->{bootloader}, $o->{fstab});
+ lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab});
}
}
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 3533f26da..57424c9ca 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -459,7 +459,7 @@ sub choosePackagesTree {
}
&$update_size;
} else {
- $o->ask_warn('', _("This is a mandatory package, it can't unselected"));
+ $o->ask_warn('', _("This is a mandatory package, it can't be unselected"));
}
}
};
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 3fa598da9..832b2c52d 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -153,7 +153,7 @@ sub selectMouse {
[ mouse::serial_ports_names() ]));
}
- $o->setup_thiskind('serial_usb', !$::expert, 0) if $o->{mouse}{device} eq "usbmouse";
+ $o->setup_thiskind('SERIAL_USB', !$::expert, 0) if $o->{mouse}{device} eq "usbmouse";
$o->SUPER::selectMouse;
}
@@ -218,7 +218,7 @@ sub choosePartitionsToFormat($$) {
$o->ask_many_from_list_ref('', _("Choose the partitions you want to format"),
[ map { $label{$_} } @l ],
[ map { \$_->{toFormat} } @l ]) or die "cancel";
- @l = grep { $_->{toFormat} } @l;
+ @l = grep { $_->{toFormat} && !isLoopback($_) } @l;
$o->ask_many_from_list_ref('', _("Check bad blocks?"),
[ map { $label{$_} } @l ],
[ map { \$_->{toFormatCheck} } @l ]) or goto &choosePartitionsToFormat if $::expert;
@@ -269,10 +269,7 @@ sub choosePackages {
$o->chooseGroups($packages, $compssUsers, $compssUsersSorted);
- my %save_selected; $save_selected{$_->{file}} = pkgs::packageFlagSelected($_) foreach values %{$packages->[0]};
- pkgs::setSelectedFromCompssList($o->{compssListLevels}, $packages, 1, 0, $o->{installClass});
- my $max_size = pkgs::selectedSize($packages);
- pkgs::packageSetFlagSelected($_, $save_selected{$_->{file}}) foreach values %{$packages->[0]};
+ my $max_size = int (sum map { pkgs::packageSize($_) } values %{$packages->[0]});
if (!$::beginner && $max_size > $available) {
$o->ask_okcancel('',
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index 3a9feefb8..773ad345f 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -85,8 +85,7 @@ sub ask_from_treelistW {
my $s; $tree->expand($wtree{$s .= "$_$separator"}) foreach split $sep, $root;
foreach my $nb (1 .. @$l) {
if ($tree->node_nth($nb) == $node) {
- $tree->set_focus_row($nb);
- Gtk->idle_add(sub { $tree->node_moveto($node, 0, 0.5, 0); 0 });
+ $tree->set_focus_row($ndef = $nb);
last;
}
}
@@ -117,17 +116,23 @@ sub ask_from_treelistW {
$tree->signal_connect(key_press_event => sub {
my ($w, $e) = @_;
my $c = chr $e->{keyval};
-
- if ($e->{keyval} >= 0x100) {
- &$leave if $c eq "\r" || $c eq "\x8d";
+ $curr or return;
+ if ($e->{keyval} >= 0x100 ? $c eq "\r" || $c eq "\x8d" : $c eq ' ') {
+ if ($curr->row->is_leaf) { &$leave }
+ else { $tree->toggle_expansion($curr) }
}
1;
});
+ $tree->grab_focus;
+ $tree->set_row_height($tree->style->font->ascent + $tree->style->font->descent + 1);
+ $w->{rwindow}->show;
+
if ($wdef) {
$tree->select($wdef);
+ $tree->node_moveto($wdef, 0, 0.5, 0);
}
- $tree->grab_focus;
+
$w->main or die "ask_from_list cancel";
}
@@ -297,7 +302,7 @@ sub wait_messageW($$$) {
@$messages,
$w->{wait_messageW} = new Gtk::Label($W)));
$w->{rwindow}->set_position('center') if $::isStandalone;
- $w->{wait_messageW}->signal_connect(expose_event => sub { print "expose_event\n"; $w->{displayed} = 1 });
+ $w->{wait_messageW}->signal_connect(expose_event => sub { $w->{displayed} = 1 });
$w->sync until $w->{displayed};
$w;
}
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 728d25a2d..9d8c51547 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -233,7 +233,7 @@ sub write($$;$) {
my ($prefix, $keyboard, $isNotDelete) = @_;
setVarsInSh("$prefix/etc/sysconfig/keyboard", { KEYTABLE => keyboard2kmap($keyboard), $isNotDelete ? () : (BACKSPACE => "Delete") });
- run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or die "dumpkeys failed";
+ run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or log::l("dumpkeys failed");
}
sub read($) {
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index 32bb62b3a..04b3786ae 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -23,6 +23,28 @@ sub loopbacks {
map { map { @{$_->{loopback} || []} } partition_table::get_normal_parts($_) } @_;
}
+sub carryRootLoopback {
+ my ($part) = @_;
+ $_->{mntpoint} eq '/' and return 1 foreach @{$part->{loopback} || []};
+ 0;
+}
+
+sub carryRootCreateSymlink {
+ my ($part, $prefix) = @_;
+
+ carryRootLoopback($part) or return;
+
+ my $mntpoint = "$prefix$part->{mntpoint}";
+ unless (-e $mntpoint) {
+ eval { commands::mkdir_("-p", dirname($mntpoint)) };
+ #- do non-relative link for install, should be changed to relative link before rebooting
+ symlink "/initrd/loopfs", $mntpoint;
+ }
+ #- indicate kernel to keep initrd
+ mkdir "$prefix/initrd", 0755;
+}
+
+
sub format_part {
my ($part, $prefix) = @_;
fs::mount_part($part->{device}, $prefix);
@@ -37,6 +59,8 @@ sub create {
return $f if -e $f;
eval { commands::mkdir_("-p", dirname($f)) };
+
+ log::l("creating loopback file $f");
local *F;
open F, ">$f" or die "failed to create loopback file";
@@ -49,8 +73,9 @@ sub create {
sub getFree {
my ($part, $prefix) = @_;
- unless ($part->{freespace}) {
- $part->{isFormatted} || !$part->{notFormatted} or return;
+ if ($part->{isFormatted} || !$part->{notFormatted}) {
+ $part->{freespace} = $part->{size};
+ } elsif (!$part->{freespace}) {
isMountableRW($part) or return;
my $dir = "/tmp/loopback_tmp";
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index c288168dd..f24b55886 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -382,7 +382,7 @@ sub load {
push @{$loaded{$type}}, $name;
if ($type) {
- add_alias('usbmouse', $name) if $type =~ /serial_usb/i;
+ add_alias('usb-interface', $name) if $type =~ /SERIAL_USB/i;
add_alias('scsi_hostadapter', $name) if $type eq "scsi" || $type eq $type_aliases{scsi};
}
$conf{$name}{options} = join " ", @options if @options;
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index fcbf1e25f..3cf91bd7a 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -135,10 +135,21 @@ sub detect() {
my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
require pci_probing::main;
- if (my ($c) = pci_probing::main::probe("serial_usb")) {
- eval { modules::load($c->[1], "serial_usb") };
+ if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
+ eval {
+ modules::load($c->[1], "SERIAL_USB");
+ modules::load("usbmouse");
+ modules::load("mousedev");
+ };
sleep(1);
- do { $wacom or modules::unload("serial"); return name2mouse("USB Mouse"), $wacom } if !$@ && detect_devices::tryOpen("usbmouse");
+ do {
+ $wacom or modules::unload("serial");
+ modules::load("usbkbd");
+ modules::load("keybdev");
+ return name2mouse("USB Mouse"), $wacom;
+ } if !$@ && detect_devices::tryOpen("usbmouse");
+ modules::unload("mousedev");
+ modules::unload("usbmouse");
modules::unload($c->[1], 'remove_alias');
}
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index 89944f342..5970a1e7c 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -320,6 +320,8 @@ sub _create_window($$) {
$w->signal_connect(delete_event => sub { undef $o->{retval}; Gtk->main_quit });
$w->set_uposition(@{$my_gtk::force_position || $o->{force_position}}) if $my_gtk::force_position || $o->{force_position};
+ $w->signal_connect('focus' => sub { Gtk->idle_add(sub { $w->ensure_focus($_[0]); 0 }, $_[1]) }) if $w->can('ensure_focus');
+
$w->signal_connect("key_press_event" => sub {
my $d = ${{ 65470 => 'help',
65481 => 'next',
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index b8c30fb86..50da8dfe5 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -20,8 +20,10 @@ my @MBR_signatures = (
[ 'TimO', 0, 'IBM Thinkpad hibernation partition' ],
[ 'os2', 0x1c2, "\xA" ],
[ 'dos', 0xa0, "\x25\x03\x4E\x02\xCD\x13" ],
+ [ 'dos', 0xa0, "\x00\xB4\x08\xCD\x13\x72" ], #- nt2k's
[ 'dos', 0x60, "\xBB\x00\x7C\xB8\x01\x02\x57\xCD\x13\x5F\x73\x0C\x33\xC0\xCD\x13" ], #- nt's
[ 'freebsd', 0xC0, "\x00\x30\xE4\xCD\x16\xCD\x19\xBB\x07\x00\xB4" ],
+ [ 'freebsd', 0x160, "\x6A\x10\x89\xE6\x48\x80\xCC\x40\xCD\x13" ],
[ 'dummy', 0xAC, "\x0E\xB3\x07\x56\xCD\x10\x5E\xEB" ], #- caldera?
[ 'ranish', 0x100, "\x6A\x10\xB4\x42\x8B\xF4\xCD\x13\x8B\xE5\x73" ],
);
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 43dca813c..faba585f5 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -116,12 +116,16 @@ sub packageFile {
$pkg->{file} . "." . c::headerGetEntry($pkg->{header}, 'arch') . ".rpm";
}
+sub cleanHeaders {
+ my ($prefix) = @_;
+ commands::rm("-rf", "$prefix/tmp/headers") if -e "$prefix/tmp/headers";
+}
#- get all headers from an hdlist file.
sub extractHeaders($$$) {
my ($prefix, $pkgs, $medium) = @_;
- commands::rm("-rf", "$prefix/tmp/headers") if -e "$prefix/tmp/headers";
+ cleanHeaders($prefix);
run_program::run("extract_archive",
"$prefix/var/lib/urpmi/$medium->{hdlist}",
@@ -375,7 +379,7 @@ sub getProvides($) {
foreach my $pkg (@{$packages->[1]}) {
map { my $provided = $packages->[1][$_] or die "invalid package index $_";
packageFlagBase($provided) or push @{$provided->{provides} ||= []}, $pkg;
- } map { split '\|' } packageDepsId($pkg);
+ } map { split '\|' } grep { !/^NOTFOUND_/ } packageDepsId($pkg);
}
}
@@ -742,7 +746,8 @@ sub install($$$;$$) {
my $callbackOpen = sub {
my $f = packageFile($packages{$_[0]});
print LOG "$f\n";
- my $fd = install_any::getFile($f) or log::l("ERROR: bad file $f");
+ my $fd = install_any::getFile($f) or install_any::rewindGetFile();
+ $fd ||= install_any::getFile($f) or log::l("ERROR: bad file $f");
$fd ? fileno $fd : -1;
};
my $callbackClose = sub { packageSetFlagInstalled(delete $packages{$_[0]}, 1) };
@@ -811,7 +816,7 @@ sub install($$$;$$) {
if (s/(installing package) .* (needs (?:.*) on the (.*) filesystem)/$1 $2/) {
$parts{$3} ? 0 : ($parts{$3} = 1);
} else { 1; }
- } reverse @probs;
+ } reverse map { s|/mnt||; $_ } @probs;
c::rpmdbClose($db);
die "installation of rpms failed:\n ", join("\n ", @probs);
@@ -821,6 +826,7 @@ sub install($$$;$$) {
c::rpmdbClose($db);
log::l("rpm database closed");
+ cleanHeaders($prefix);
install_any::rewindGetFile(); #- make sure to reopen the connection, usefull for ftp.
}
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index 5fcedf3b5..e5605c5bf 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -127,7 +127,8 @@ sub make {
eval { commands::modprobe(module($part)) };
run_program::run("raidstop", $dev);
&write($raid, "/etc/raidtab");
- run_program::run("mkraid", "--really-force", $dev);
+ run_program::run("mkraid", "--really-force", $dev) or die
+ $::isStandalone ? _("mkraid failed (maybe raidtools are missing?)") : _("mkraid failed");
}
sub format_part($$) {
diff --git a/perl-install/timezone.pm b/perl-install/timezone.pm
index 449c8b428..093e161f2 100644
--- a/perl-install/timezone.pm
+++ b/perl-install/timezone.pm
@@ -76,7 +76,6 @@ my %l2t = (
'Spanish (Argentina)' => 'America/Buenos_Aires',
'Spanish (Mexico)' => 'America/Mexico_City',
'Spanish (Spain)' => 'Europe/Madrid',
-'Swedish (Finland)' => 'Europe/Helsinki',
'Swedish (Sweden)' => 'Europe/Stockholm',
'Thai (Thailand)' => 'Asia/Bangkok',
'Turkish (Turkey)' => 'Europe/Istanbul',