summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog13
-rw-r--r--perl-install/Xconfigurator.pm2
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/install_any.pm8
-rw-r--r--perl-install/install_steps.pm3
-rw-r--r--perl-install/install_steps_gtk.pm2
-rw-r--r--perl-install/install_steps_interactive.pm4
-rw-r--r--perl-install/mouse.pm8
-rw-r--r--perl-install/pkgs.pm26
-rwxr-xr-xperl-install/standalone/mousedrake35
10 files changed, 64 insertions, 41 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 205a418ab..0fbb8689c 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,5 +1,18 @@
2000-09-21 Pixel <pixel@mandrakesoft.com>
+ * Xconfigurator.pm (write_XF86Config): comment the omit
+ xfree86-dga
+
+ * install_steps.pm (afterInstallPackages): configure GPG public
+ keyring with mandrake key
+
+ * standalone/mousedrake: updated/fixed for new mouse handling
+
+ * install2.pm (main): update for handling oem installs
+
+ * many files: relGetFile cleanup, updated calls to getFile and
+ getAndSaveFile accordingly
+
* Xconfigurator.pm (testFinalConfig): new XFdrake-image-test.jpg
* detect_devices.pm (@netdevices): plip removed in standalone,
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index cfd83dd14..6dd6efd05 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -801,7 +801,7 @@ Section "Module"
# initialisation of the XFree86-DGA extension within that module.
SubSection "extmod"
- Option "omit xfree86-dga"
+ #Option "omit xfree86-dga"
EndSubSection
# This loads the Type1 and FreeType font modules
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 9677f38af..84773836d 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -640,7 +640,9 @@ sub main {
push @auto, 'selectInstallClass';
}
if ($oem) {
- push @auto, 'selectInstallClass', 'selectMouse', 'configureTimezone', 'exitInstall';
+ $o->{partitioning}{auto_allocate} = 1;
+ $o->{compssListLevel} = 50;
+ push @auto, 'selectInstallClass', 'selectMouse', 'doPartitionDisks', 'choosePackages', 'configureTimezone', 'exitInstall';
}
foreach (@auto) {
eval "undef *" . (!/::/ && "install_steps_interactive::") . $_;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index e0f3475cd..86afd29b9 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -63,11 +63,7 @@ sub changeMedium($$) {
}
sub relGetFile($) {
local $_ = $_[0];
- m,^(Mandrake|lnx4win)/, and return $_;
- /\.img$/ and return "images/$_";
- my $dir = m|/| ? "Mandrake/mdkinst" : /^(?:compss|compssList|compssUsers|provides|filelist|depslist.*|hdlist.*|auto_inst.*)$/ ?
- "Mandrake/base/": "$::o->{packages}[2]{$asked_medium}{rpmsdir}/";
- "$dir$_";
+ m|\.rpm$| ? "$::o->{packages}[2]{$asked_medium}{rpmsdir}/$_" : $_;
}
sub askChangeMedium($$) {
my ($method, $medium) = @_;
@@ -541,7 +537,7 @@ sub loadO {
my ($O, $f) = @_; $f ||= auto_inst_file;
my $o;
if ($f =~ /^(floppy|patch)$/) {
- my $f = $f eq "floppy" ? "auto_inst.cfg" : "patch";
+ my $f = $f eq "floppy" ? 'Mandrake/base/auto_inst.cfg' : "patch";
unless ($::testing) {
fs::mount(devices::make("fd0"), "/mnt", (arch() =~ /sparc/ ? "romfs" : "vfat"), 'readonly');
$f = "/mnt/$f";
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index c0246035e..ca5cd2a2a 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -432,6 +432,9 @@ Consoles 1,3,4,7 may also contain interesting information";
substInFile { s/^urpmi\n//; $_ .= "urpmi\n" if eof } "$msec/group.conf" if -d $msec;
}
+ install_any::getAndSaveFile('RPM-GPG-KEYS', '/root/tmp/RPM-GPG-KEYS');
+ run_program::rooted($o->{prefix}, qw(gpg --fast-import --keyring /etc/rpm/pubring.gpg /root/tmp/RPM-GPG-KEYS));
+
# #- update language and icons for KDE.
# update_userkderc($o->{prefix}, 'Locale', Language => "");
# log::l("updating kde icons according to available devices");
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 6144af723..6eb6ac2d7 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -82,7 +82,7 @@ sub new($$) {
my $prog = /Xsun|Xpmac/ ? $_ : "XF86_$_";
unless (-x "$dir/$prog") {
unlink $_ foreach glob_("$dir/X*");
- install_any::getAndSaveFile("$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!";
+ install_any::getAndSaveFile("Mandrake/mdkinst$dir/$prog", "$dir/$prog") or die "failed to get server $prog: $!";
chmod 0755, "$dir/$prog";
}
if (/FB/) {
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index e142d4c47..cc4a93e1d 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -913,7 +913,7 @@ _("Do you want to generate an auto install floppy for linux replication?"), $flo
my $workdir = "$o->{prefix}/tmp/work"; -d $workdir or rmdir $workdir;
my $w = $o->wait_message('', _("Creating auto install floppy"));
- install_any::getAndSaveFile("$image.img", $imagefile) or log::l("failed to write $dev"), return;
+ install_any::getAndSaveFile("images/$image.img", $imagefile) or log::l("failed to write $dev"), return;
devices::make($_) foreach qw(/dev/loop6 /dev/ram);
run_program::run("losetup", "/dev/loop6", $imagefile);
@@ -943,7 +943,7 @@ _("Do you want to generate an auto install floppy for linux replication?"), $flo
} else {
{
my $w = $o->wait_message('', _("Creating auto install floppy"));
- install_any::getAndSaveFile("$image.img", $dev) or log::l("failed to write $dev"), return;
+ install_any::getAndSaveFile("images/$image.img", $dev) or log::l("failed to write $dev"), return;
}
fs::mount($dev, "/floppy", "vfat", 0);
substInFile { s/timeout.*//; s/^(\s*append)/$1 kickstart=floppy/ } "/floppy/syslinux.cfg";
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index a1debd013..3366e0807 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -202,12 +202,18 @@ sub detect() {
# find one whether or not I had one installed! So.. default to it.
"busmouse|2 buttons");
}
+
+ if ($::isStandalone) {
+ detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1);
+ }
#- probe serial device to make sure a wacom has been detected.
eval { commands::modprobe("serial") };
my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
- detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1), $wacom;
+ if (!$::isStandalone) {
+ detect_devices::hasMousePS2("psaux") and return fullname2mouse("PS/2|Standard", unsafe => 1), $wacom;
+ }
if (modules::get_alias("usb-interface") && detect_devices::hasUsbMouse()) {
eval {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c74e4365b..593e574ef 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -383,7 +383,7 @@ sub skipSetWithProvides {
sub psUpdateHdlistsDeps {
my ($prefix, $method) = @_;
- my $listf = install_any::getFile('hdlists') or die "no hdlists found";
+ my $listf = install_any::getFile('Mandrake/base/hdlists') or die "no hdlists found";
#- WARNING: this function should be kept in sync with functions
#- psUsingHdlists and psUsingHdlist.
@@ -403,20 +403,20 @@ sub psUpdateHdlistsDeps {
my $fakemedium = $method . $medium;
my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz2" . ($hdlist =~ /\.cz2/ && "2");
-e $newf and do { unlink $newf or die "cannot remove $newf: $!"; };
- install_any::getAndSaveFile($hdlist, $newf) or die "no $hdlist found";
+ install_any::getAndSaveFile("Mandrake/base/$hdlist", $newf) or die "no $hdlist found";
symlinkf $newf, "/tmp/$hdlist";
++$medium;
}
#- this is necessary for urpmi.
- install_any::getAndSaveFile("depslist.ordered", "$prefix/var/lib/urpmi/depslist.ordered");
- install_any::getAndSaveFile("provides", "$prefix/var/lib/urpmi/provides");
- install_any::getAndSaveFile("compss", "$prefix/var/lib/urpmi/compss");
+ install_any::getAndSaveFile('Mandrake/base/depslist.ordered', "$prefix/var/lib/urpmi/depslist.ordered");
+ install_any::getAndSaveFile('Mandrake/base/provides', "$prefix/var/lib/urpmi/provides");
+ install_any::getAndSaveFile('Mandrake/base/compss', "$prefix/var/lib/urpmi/compss");
}
sub psUsingHdlists {
my ($prefix, $method) = @_;
- my $listf = install_any::getFile('hdlists') or die "no hdlists found";
+ my $listf = install_any::getFile('Mandrake/base/hdlists') or die "no hdlists found";
my @packages = ({}, [], {});
my @hdlists;
@@ -466,7 +466,7 @@ sub psUsingHdlist {
#- for getting header of package during installation or after by urpmi.
my $newf = "$prefix/var/lib/urpmi/hdlist.$fakemedium.cz" . ($hdlist =~ /\.cz2/ && "2");
-e $newf and do { unlink $newf or die "cannot remove $newf: $!"; };
- install_any::getAndSaveFile($fhdlist || $hdlist, $newf) or die "no $hdlist found";
+ install_any::getAndSaveFile($fhdlist || "Mandrake/base/$hdlist", $newf) or die "no $hdlist found";
symlinkf $newf, "/tmp/$hdlist";
#- extract filename from archive, this take advantage of verifying
@@ -553,8 +553,8 @@ sub getDeps($) {
my ($prefix, $packages) = @_;
#- this is necessary for urpmi.
- install_any::getAndSaveFile("depslist.ordered", "$prefix/var/lib/urpmi/depslist.ordered");
- install_any::getAndSaveFile("provides", "$prefix/var/lib/urpmi/provides");
+ install_any::getAndSaveFile('Mandrake/base/depslist.ordered', "$prefix/var/lib/urpmi/depslist.ordered");
+ install_any::getAndSaveFile('Mandrake/base/provides', "$prefix/var/lib/urpmi/provides");
#- beware of heavily mismatching depslist.ordered file against hdlist files.
my $mismatch = 0;
@@ -619,7 +619,7 @@ sub readCompss {
my ($p, @compss);
#- this is necessary for urpmi.
- install_any::getAndSaveFile("compss", "$prefix/var/lib/urpmi/compss");
+ install_any::getAndSaveFile('Mandrake/base/compss', "$prefix/var/lib/urpmi/compss");
local *F;
open F, "$prefix/var/lib/urpmi/compss" or die "can't find compss";
@@ -640,7 +640,7 @@ sub readCompss {
sub readCompssList {
my ($packages, $langs) = @_;
- my $f = install_any::getFile("compssList") or die "can't find compssList";
+ my $f = install_any::getFile('Mandrake/base/compssList') or die "can't find compssList";
my @levels = split ' ', <$f>;
foreach (<$f>) {
@@ -675,7 +675,7 @@ sub readCompssUsers {
$l or return;
$_ = $packages->[0]{$_} or log::l("unknown package $1 (in compssUsers)") foreach @$l;
};
- my $f = install_any::getFile("compssUsers") or die "can't find compssUsers";
+ my $f = install_any::getFile('Mandrake/base/compssUsers') or die "can't find compssUsers";
foreach (<$f>) {
/^\s*$/ || /^#/ and next;
s/#.*//;
@@ -794,7 +794,7 @@ sub selectPackagesToUpgrade($$$;$$) {
#- get filelist of package to avoid getting all header into memory.
my %filelist;
my $current;
- my $f = install_any::getFile("filelist") or log::l("unable to get filelist of packages");
+ my $f = install_any::getFile('Mandrake/base/filelist') or log::l("unable to get filelist of packages");
foreach (<$f>) {
chomp;
if (/^#(.*)/) {
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index 2b646e334..93fc3081e 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -2,28 +2,30 @@
use lib qw(/usr/lib/libDrakX);
-use common qw(:system);
+use common qw(:common :system);
use interactive;
use mouse;
use c;
local $_ = join '', @ARGV;
-/-h/ and die "usage: mousedrake [--auto] [--noauto] [--testing]\n";
+/-h/ and die "usage: mousedrake [--auto] [--testing]\n";
$::auto = /-auto/;
-$::noauto = /-noauto/;
$::testing = /-testing/;
$::isStandalone = 1;
my $in = vnew interactive('su');
-my $mouse = eval { mouse::detect() } unless $::noauto;
+my ($mouse) = mouse::detect() unless $::noauto;
-if (!(my $name = $mouse && $mouse->{FULLNAME}) || !$::auto) {
- $name ||= "Generic Mouse (serial)";
- $name = $in->ask_from_list_('', _("What is the type of your mouse?"), [ mouse::names() ], $name);
- $mouse = mouse::name2mouse($name);
+if (!$mouse || !$::auto) {
+ $mouse ||= mouse::fullname2mouse("serial|Generic 2 Button Mouse");
+ my $name = $in->ask_from_treelistf('', _("Please, choose the type of your mouse."), '|',
+ sub { join '|', map { translate($_) } split '\|', $_[0] },
+ [ mouse::fullnames ],
+ $mouse->{type} . '|' . $mouse->{name});
+ $mouse = mouse::fullname2mouse($name);
if ($mouse->{device} eq "usbmouse") {
require pci_probing::main;
@@ -45,23 +47,24 @@ modules::write_conf('') if $mouse->{device} eq "usbmouse" && !$::testing;
my $f = "/etc/X11/XF86Config";
my $g = "/etc/X11/XF86Config-4";
-my $zaxis = "\n ZAxisMapping 4 5" if $mouse->{nbuttons} > 3;
- $zaxis .= "\n ZAxisMapping 6 7" if $mouse->{nbuttons} > 5;
- $zaxis = "
- Emulate3Buttons
- Emulate3Timeout 50" if $mouse->{nbuttons} < 3;
+my @zaxis = (
+ $mouse->{nbuttons} > 3 ? [ "ZAxisMapping", "4 5" ] : (),
+ $mouse->{nbuttons} > 5 ? [ "ZAxisMapping", "6 7" ] : (),
+ $mouse->{nbuttons} < 3 ? ([ "Emulate3Buttons" ], [ "Emulate3Timeout", "50" ]) : ()
+);
+my $zaxis = join('', map { qq(\n $_->[0]) . ($_->[1] && qq( $_->[1])) } @zaxis);
substInFile {
- if (/^Section "Pointer"/ .. /^EndSection/) {
+ if (/^Section\s+"Pointer"/ .. /^EndSection/) {
$_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line
s|^(\s*Protocol\s+).*|$1"$mouse->{XMOUSETYPE}"|;
s|^(\s*Device\s+).*|$1"/dev/mouse"$zaxis|;
}
} $f if -e $f && !$::testing;
-$zaxis =~ s/(ZAxisMapping|Emulate3\w+)/Option "$1"/g;
+$zaxis = join('', map { qq(\n Option "$_->[0]") . ($_->[1] && qq( "$_->[1]")) } @zaxis);
substInFile {
- if (/^Identifier "Mouse1"/ .. /^EndSection/) {
+ if (/Identifier\s+"Mouse1"/ .. /^EndSection/) {
$_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line
s|^(\s*Option\s+"Protocol"\s+).*|$1"$mouse->{XMOUSETYPE}"|;
s|^(\s*Option\s+"Device"\s+).*|$1"/dev/mouse"$zaxis|;