summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-22 23:18:25 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-22 23:18:25 +0000
commit9ee84a2c340af2d4b1912d7573c2223368a22903 (patch)
tree3d59260e22c2e03770f9a24370b11e9e350b18f5 /perl-install
parent5c1d5c819d907a1bb5e98477b9aeb7dc9e2fda9e (diff)
downloaddrakx-9ee84a2c340af2d4b1912d7573c2223368a22903.tar
drakx-9ee84a2c340af2d4b1912d7573c2223368a22903.tar.gz
drakx-9ee84a2c340af2d4b1912d7573c2223368a22903.tar.bz2
drakx-9ee84a2c340af2d4b1912d7573c2223368a22903.tar.xz
drakx-9ee84a2c340af2d4b1912d7573c2223368a22903.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog4
-rw-r--r--perl-install/Makefile5
-rw-r--r--perl-install/fs.pm4
-rw-r--r--perl-install/install2.pm9
-rw-r--r--perl-install/install_any.pm11
-rw-r--r--perl-install/install_steps.pm11
-rw-r--r--perl-install/install_steps_interactive.pm4
-rw-r--r--perl-install/loopback.pm31
-rw-r--r--perl-install/pkgs.pm2
-rw-r--r--perl-install/share/compssList2
-rw-r--r--perl-install/share/list2
-rwxr-xr-xperl-install/standalone/diskdrake2
12 files changed, 50 insertions, 37 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index ce91e1e24..d828ede61 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,7 @@
+2000-03-22 Pixel <pixel@mandrakesoft.com>
+
+ * pci_probing/pcitable: replace Server:Rage128 by proper XFree entry
+
2000-03-20 François Pons <fpons@mandrakesoft.com>
* detect_devices.pm, fs.pm, install_any.pm: added supports for
diff --git a/perl-install/Makefile b/perl-install/Makefile
index 4cad2c4d5..d2cdc4e97 100644
--- a/perl-install/Makefile
+++ b/perl-install/Makefile
@@ -56,7 +56,10 @@ install_pms: $(DIRS)
get_needed_files: $(DIRS)
# export PERL_INSTALL_TEST=1 ; strace -f -e trace=file -o '| grep -v "(No such file or directory)" | sed -e "s/[^\"]*\"//" -e "s/\".*//" | grep "^/" | grep -v -e "^/tmp" -e "^/home" -e "^/proc" -e "^/var" -e "^/dev" -e "^/etc" -e "^/usr/lib/rpm" > /tmp/list ' $(PERL) -d install2 < /dev/null
perl -pe "s/ARCH/$(ARCH)/g" share/list > /tmp/list
-# perl -pi -e 's/00503/5.660/g' /tmp/list
+
+# perl -pi -e 's/00503/6.0/g' /tmp/list
+# see also /usr/lib/perl5/5.00503/ARCH-linux/Data/Dumper.pm
+
cat `../tools/specific_arch share/list` >> /tmp/list
find auto -follow -name "*.so" >> /tmp/list
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 11deb20f8..7ab038273 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -135,8 +135,6 @@ sub format_part {
sub formatMount_part {
my ($part, $raid, $fstab, $prefix, $callback) = @_;
- log::l("formatMount_part: $part->{mntpoint}\n");
-
if (isLoopback($part)) {
formatMount_part($part->{device}, $raid, $fstab, $prefix, $callback);
}
@@ -144,8 +142,6 @@ sub formatMount_part {
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;
format_part($raid, $part, $prefix);
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index b666c536e..07095f8b7 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -191,11 +191,6 @@ $o = $::o = {
#- display => "192.168.1.19:1",
steps => \%installSteps,
orderedSteps => \@orderedInstallSteps,
- base => [ qw(basesystem sed initscripts console-tools utempter ldconfig chkconfig ntsysv setup filesystem SysVinit bdflush crontabs dev e2fsprogs etcskel fileutils findutils getty_ps grep gzip hdparm info kernel less ldconfig logrotate losetup man mingetty modutils mount net-tools passwd procmail procps psmisc mandrake-release rootfiles rpm sash ash setserial shadow-utils sh-utils stat sysklogd tar termcap textutils time tmpwatch util-linux vim-minimal vixie-cron which perl-base msec) ],
- base_i386 => [ "lilo", "grub", "mkbootdisk", "isapnptools" ],
- base_alpha => [ "aboot", "isapnptools" ],
- base_sparc => [ "silo", "mkbootdisk" ],
- base_ppc => [ "kernel-pmac", "pdisk", "hfsutils" ],
#- for the list of fields available for user and superuser, see @etc_pass_fields in install_steps.pm
#- intf => [ { DEVICE => "eth0", IPADDR => '1.2.3.4', NETMASK => '255.255.255.128' } ],
@@ -360,9 +355,7 @@ sub choosePackages {
pkgs::unselectPackage($o->{packages}, $pkg) if $pkg && $o->{security} > 3;
#- check pre-condition where base backage has to be selected.
- foreach (@{$o->{base}}) {
- pkgs::packageFlagSelected(pkgs::packageByName($o->{packages}, $_)) or die "base package not selected";
- }
+ pkgs::packageFlagSelected(pkgs::packageByName($o->{packages}, 'basesystem')) or die "basesystem package not selected";
}
}
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 321c6731a..f9f04da84 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -185,8 +185,6 @@ sub setPackages($) {
pkgs::getDeps($o->{packages});
- push @{$o->{base}}, @{delete($o->{"base_" . arch()}) || []};
-
$o->{compss} = pkgs::readCompss($o->{packages});
$o->{compssListLevels} = pkgs::readCompssList($o->{packages}, $o->{compss});
($o->{compssUsers}, $o->{compssUsersSorted}) = pkgs::readCompssUsers($o->{packages}, $o->{compss});
@@ -195,12 +193,7 @@ sub setPackages($) {
push @l, "kapm" if $o->{pcmcia};
$_->{values} = [ map { $_ + 50 } @{$_->{values}} ] foreach grep {$_} map { $o->{packages}{$_} } @l;
- grep { !pkgs::packageByName($o->{packages}, $_) && log::l("missing base package $_") } @{$o->{base}} and die "missing some base packages";
-
- foreach (@{$o->{base}}) {
- my $p = pkgs::packageByName($o->{packages}, $_) or log::l("missing base package $_"), next;
- pkgs::selectPackage($o->{packages}, $p, 1);
- }
+ pkgs::selectPackage($o->{packages}, pkgs::packageByName($o->{packages}, 'basesystem') || die("missing basesystem package"), 1);
#- must be done after selecting base packages (to save memory)
pkgs::getProvides($o->{packages});
@@ -486,7 +479,7 @@ sub g_auto_install(;$) {
my @fields = qw(mntpoint type size);
$o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
- exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
+ exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
if (my $card = $::o->{X}{card}) {
$o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth);
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 5abd53cff..7d3b00e03 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -17,6 +17,7 @@ use raid;
use keyboard;
use log;
use fsedit;
+use loopback;
use commands;
use network;
use any;
@@ -157,7 +158,9 @@ sub choosePartitionsToFormat($$) {
$_->{mntpoint} or next;
unless ($_->{toFormat} = $_->{notFormatted} || $o->{partitioning}{autoformat}) {
- my $t = fsedit::typeOfPart($_->{device});
+ my $t = isLoopback($_) ?
+ eval { fsedit::typeOfPart($o->{prefix} . loopback::file($_)) } :
+ fsedit::typeOfPart($_->{device});
$_->{toFormatUnsure} = $_->{mntpoint} eq "/" ||
#- if detected dos/win, it's not precise enough to just compare the types (too many of them)
(isFat({ type => $t }) ? !isFat($_) : $t != $_->{type});
@@ -655,8 +658,10 @@ sub setupBootloader($) {
} elsif (arch() =~ /^sparc/) {
silo::install($o->{prefix}, $o->{bootloader});
} else {
- lilo::install_grub($o->{prefix}, $o->{bootloader}, $o->{fstab});
- lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab});
+ eval { lilo::install($o->{prefix}, $o->{bootloader}, $o->{fstab}) };
+ my $err = $@;
+ eval { lilo::install_grub($o->{prefix}, $o->{bootloader}, $o->{fstab}) };
+ die if $err;
}
}
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index 26781f254..e736afb74 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -213,7 +213,9 @@ sub choosePartitionsToFormat($$) {
log::l("preparing to format $_->{mntpoint}") foreach grep { $_->{toFormat} } @l;
my %label;
- $label{$_} = (isSwap($_) ? type2name($_->{type}) : $_->{mntpoint}) . " ($_->{device})" foreach @l;
+ $label{$_} = sprintf("%s (%s)",
+ isSwap($_) ? type2name($_->{type}) : $_->{mntpoint},
+ isLoopback($_) ? loopback::file($_) : $_->{device}) foreach @l;
$o->ask_many_from_list_ref('', _("Choose the partitions you want to format"),
[ map { $label{$_} } @l ],
diff --git a/perl-install/loopback.pm b/perl-install/loopback.pm
index 88623fbe2..8fd9c8748 100644
--- a/perl-install/loopback.pm
+++ b/perl-install/loopback.pm
@@ -6,7 +6,7 @@ use strict;
#-######################################################################################
#- misc imports
#-######################################################################################
-use common qw(:common :system :file);
+use common qw(:common :system :file :functional);
use partition_table qw(:types);
use commands;
use fs;
@@ -79,17 +79,19 @@ sub inspect {
if ($part->{isMounted}) {
$dir = ($prefix || '') . $part->{mntpoint};
+ } elsif ($part->{notFormatted} && !$part->{isFormatted}) {
+ $dir = '';
} else {
mkdir $dir, 0700;
fs::mount($part->{device}, $dir, type2fs($part->{type}), 'rdonly');
}
- my $h = bless \$dir, "loopback::inspect";
- common::add_f4before_leaving(sub {
- unless ($part->{isMounted}) {
+ my $h = before_leaving {
+ if (!$part->{isMounted} && $dir) {
fs::umount($dir);
unlink($dir)
}
- }, $h, 'DESTROY');
+ };
+ $h->{dir} = $dir;
$h;
}
@@ -97,18 +99,31 @@ sub getFree {
my ($dir, $part) = @_;
my ($freespace);
- if ($part->{isFormatted} || !$part->{notFormatted}) {
- $freespace = $part->{size};
- } else {
+ if ($dir) {
my $buf = ' ' x 20000;
syscall_('statfs', $dir, $buf) or return;
my (undef, $blocksize, $size, undef, $free, undef) = unpack "L2L4", $buf;
$_ *= $blocksize / 512 foreach $free;
$freespace = $free;
+ } else {
+ $freespace = $part->{size};
}
+
$freespace - sum map { $_->{size} } @{$part->{loopback} || []};
}
+#- returns the size of the loopback file if it already exists
+#- returns -1 is the loopback file can't be used
+sub verifFile {
+ my ($dir, $file, $part) = @_;
+ -e "$dir$file" and return -s "$dir$file";
+
+ $_->{loopback_file} eq $file and return -1 foreach @{$part->{loopback} || []};
+
+ undef;
+}
+
+
1;
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c391b2494..0f8a5bd52 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -65,7 +65,7 @@ autoirpm autoirpm-icons numlock
'zh_TW.Big5' => [ 'rxvt-CLE', 'fonts-ttf-big5' ],
);
-@preferred = qw(perl-GTK postfix ghostscript-X);
+@preferred = qw(perl-GTK postfix ghostscript-X vim-minimal);
#- constant for small transaction.
$limitMinTrans = 8;
diff --git a/perl-install/share/compssList b/perl-install/share/compssList
index 06b37556a..149099317 100644
--- a/perl-install/share/compssList
+++ b/perl-install/share/compssList
@@ -318,7 +318,7 @@ grip 60 0 35
groff 97 97 97
groff-gxditview 22 0 19
grpmi 0 0 0
-grub 2 0 9
+grub 99 99 99
gscript 0 0 0
gsl 10 0 0
gsu 65 0 53
diff --git a/perl-install/share/list b/perl-install/share/list
index 64753eafe..c1436489d 100644
--- a/perl-install/share/list
+++ b/perl-install/share/list
@@ -56,6 +56,8 @@
/usr/lib/perl5/5.00503/Symbol.pm
/usr/lib/perl5/5.00503/Time/Local.pm
/usr/lib/perl5/5.00503/dumpvar.pl
+/usr/lib/perl5/5.00503/warnings.pm
+/usr/lib/perl5/5.00503/warnings/register.pm
/usr/lib/perl5/5.00503/ARCH-linux/Config.pm
/usr/lib/perl5/5.00503/ARCH-linux/DynaLoader.pm
/usr/lib/perl5/5.00503/ARCH-linux/Fcntl.pm
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index f4f1e0d5c..9b782332a 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -22,7 +22,7 @@
# DiskDrake is also based upon the libfdisk and the install from Red Hat Software
-use lib qw(/usr/lib/libDrakX);
+use lib "."; #qw(/usr/lib/libDrakX);
use common qw(:common :functional);
use diskdrake;
use interactive_gtk;