summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorAdam Lebsack <adam@mandriva.com>2000-05-27 23:40:06 +0000
committerAdam Lebsack <adam@mandriva.com>2000-05-27 23:40:06 +0000
commit9bf03d1088adcd4187b418af6dad4429a91f7e2f (patch)
treebbe54dbc52f3f79fb87dbd5039802d995035ea3f /perl-install
parent23912a3c7bfcd56adf598eaee1c29315ccae4780 (diff)
downloaddrakx-9bf03d1088adcd4187b418af6dad4429a91f7e2f.tar
drakx-9bf03d1088adcd4187b418af6dad4429a91f7e2f.tar.gz
drakx-9bf03d1088adcd4187b418af6dad4429a91f7e2f.tar.bz2
drakx-9bf03d1088adcd4187b418af6dad4429a91f7e2f.tar.xz
drakx-9bf03d1088adcd4187b418af6dad4429a91f7e2f.zip
see Changelog
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog14
-rw-r--r--perl-install/fs.pm2
-rw-r--r--perl-install/fsedit.pm4
-rw-r--r--perl-install/install_steps_gtk.pm13
-rw-r--r--perl-install/install_steps_interactive.pm2
-rw-r--r--perl-install/keyboard.pm4
-rw-r--r--perl-install/partition_table.pm2
-rw-r--r--perl-install/partition_table_mac.pm63
8 files changed, 80 insertions, 24 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 6472ee407..f9d177b84 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,17 @@
+2000-05-27 Adam Lebsack <adam@mandrakesoft.com>
+ * share/list.ppc: various PPC modifications, for HFS
+ * partition_table_mac.pm: bug fixes
+ * partition_table.pm: various HFS fixes, isHiddenMacPart()
+ * diskdrake.pm: added HFS to top buttons when run on PPC
+ * keyboard.pm: fixed name of mac-fr2-ext keymap
+ * install_steps_gtk.pm: added Xpmac server support for PPC.
+ * install_steps_interactive.pm: disallow hardware configuration on PPC for
+ now. All drivers should be in the kernel. setup_this_kind().
+ * fsedit.pm: fixed verify_hds for PPC, /proc/partitions will never match
+ our partition table read. Added PPC grep condition for PPC in get_visible_fstab.
+ * fs.pm: fix argument for HFS formatting.
+ * Makefile: special installation of PPC files.
+
2000-05-25 Chmouel Boudjnah <chmouel@mandrakesoft.com>
* standalone/drakboot: Don't display Configure-/LILO/GRUB/ on
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index ef40fee4f..12e9ceae0 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -121,7 +121,7 @@ sub real_format_part {
} elsif (isWin($part)) {
format_dos($part->{device}, @options, '-F', 32);
} elsif (isHFS($part)) {
- format_hfs($part->{device}, @options, '-l', "\"Untitled\"");
+ format_hfs($part->{device}, @options, '-l', "Untitled");
} elsif (isSwap($part)) {
my $check_blocks = grep { /^-c$/ } @options;
swap::make($part->{device}, $check_blocks);
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 30b605927..020a6f57c 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -107,7 +107,7 @@ sub get_fstab(@) {
#- get normal partition that should be visible for working on.
sub get_visible_fstab(@) {
- grep { $_ && !partition_table::isWholedisk($_) } map { partition_table::get_normal_parts($_) } @_;
+ grep { $_ && !partition_table::isWholedisk($_) && !partition_table::isHiddenMacPart($_) } map { partition_table::get_normal_parts($_) } @_;
}
sub free_space(@) {
@@ -438,7 +438,7 @@ sub verifyHds {
}
my @parts = readProcPartitions($hds);
- $ok &&= @parts == listlength(get_fstab(@$hds));
+ $ok &&= @parts == listlength(get_fstab(@$hds)) unless arch() eq "ppc";
if ($readonly && !$ok) {
log::l("using /proc/partitions as diskdrake failed :(");
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 763012057..10878f247 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -61,8 +61,8 @@ sub new($$) {
my $ok = 1;
local $SIG{CHLD} = sub { $ok = 0 if waitpid(-1, c::WNOHANG()) > 0 };
unless (fork) {
- exec $_[0], (arch() =~ /^sparc/ ? () : ("-kb")), "-dpms","-s" ,"240",
- ($_[0] =~ /Xsun/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") :
+ exec $_[0], (arch() =~ /^sparc/ || arch() eq "ppc" ? () : ("-kb")), "-dpms","-s" ,"240",
+ ($_[0] =~ /Xsun/ || $_[0] =~ /Xpmac/ ? ("-fp", "/usr/X11R6/lib/X11/fonts:unscaled") :
("-allowMouseOpenFail", "-xf86config", $f)) or exit 1;
}
foreach (1..60) {
@@ -85,14 +85,15 @@ sub new($$) {
if (/Mach64/) { @servers = qw(Mach64) }
elsif (/Permedia2/) { @servers = qw(3DLabs) }
else { @servers = qw(Xsun24) }
- }
- @servers = qw(PPCDummy) if arch() eq "ppc";
+ } elsif (arch() eq "ppc") {
+ @servers = qw(Xpmac);
+ }
foreach (@servers) {
log::l("Trying with server $_");
sleep 3;
my $dir = "/usr/X11R6/bin";
- my $prog = /Xsun/ ? $_ : "XF86_$_";
+ 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: $!";
@@ -812,6 +813,8 @@ sub create_logo_window() {
}
sub init_sizes() {
+# my $maxheight = arch() eq "ppc" ? 1024 : 600;
+# my $maxwidth = arch() eq "ppc" ? 1280 : 800;
($::rootheight, $::rootwidth) = (480, 640);
($::rootheight, $::rootwidth) = my_gtk::gtkroot()->get_size;
#- ($::rootheight, $::rootwidth) = (min(768, $::rootheight), min(1024, $::rootwidth));
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm
index daae89ed9..3023d8cb1 100644
--- a/perl-install/install_steps_interactive.pm
+++ b/perl-install/install_steps_interactive.pm
@@ -1165,6 +1165,8 @@ sub load_thiskind {
sub setup_thiskind {
my ($o, $type, $auto, $at_least_one) = @_;
+ return if arch() eq "ppc";
+
my @l;
my $allow_probe = !$::expert || $o->ask_yesorno('', _("Try to find PCI devices?"), 1);
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 18cfca837..db4c09297 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -99,10 +99,10 @@ arch() =~ /^sparc/ ? (
"uk" => [ __("UK keyboard"), "sunt5-uk", "gb" ],
"us" => [ __("US keyboard"), "sunkeymap", "us" ],
) : (
-arch() =~ /^ppc/ ? (
+arch() eq "ppc" ? (
"us" => [ __("US keyboard"), "mac-us-ext", "us" ],
"de_nodeadkeys" => [ __("German"), "mac-de-latin1-nodeadkeys", "de(nodeadkeys)" ],
- "fr" => [ __("French"), "mac-fr3", "fr" ],
+ "fr" => [ __("French"), "mac-fr2-ext", "fr" ],
) : (
"am_old" => [ __("Armenian (old)"), "am_old", "am(old)" ],
"am" => [ __("Armenian (typewriter)"), "am-armscii8", "am" ],
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 84c7cfa5a..4b77d5d6a 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -216,7 +216,7 @@ sub isNfs($) { $_[0]{type} eq 'nfs' } #- small hack
sub isNT($) { arch() !~ /^sparc/ && $_[0]{type} == 0x7 }
sub isSupermount($) { $_[0]{type} eq 'supermount' }
sub isHFS($) { $type2fs{$_[0]{type}} eq 'hfs' }
-sub isApplePartMap { defined $_[0]{isMap} }
+sub isHiddenMacPart { defined $_[0]{isMap} }
sub isLoopback { defined $_[0]{loopback_file} }
sub isTrueFS { isExt2($_[0]) || isReiserfs($_[0]) }
sub isMountableRW { isTrueFS($_[0]) || isFat($_[0]) }
diff --git a/perl-install/partition_table_mac.pm b/perl-install/partition_table_mac.pm
index 8cf386cde..568e396b2 100644
--- a/perl-install/partition_table_mac.pm
+++ b/perl-install/partition_table_mac.pm
@@ -76,7 +76,15 @@ my $pmagic = 0x504D;
sub adjustStart($$) {
my ($hd, $part) = @_;
+ my $end = $part->{start} + $part->{size};
+ my $partmap_end = $hd->{primary}{raw}[0]{size};
+
+ if ($part->{start} <= $partmap_end) {
+ $part->{start} = $partmap_end + 1;
+ $part->{size} = $end - $part->{start};
+ }
}
+
sub adjustEnd($$) {
my ($hd, $part) = @_;
}
@@ -94,7 +102,8 @@ sub read($$) {
foreach $i (0 .. $info{bzDrvrCnt}-1) {
sysread F, $tmp, psizeof($dd_format) or die "error while reading driver data in sector $sector";
- $info{ddMap}[$i] = unpack $dd_format, $tmp;
+ my %dd; @dd{@$dd_fields} = unpack $dd_format, $tmp;
+ push @{$info{ddMap}}, \%dd;
}
#- check magic number
@@ -127,7 +136,8 @@ sub read($$) {
if ($h{pType} =~ /^Apple_UNIX_SVR2/i) {
$h{pName} =~ /swap/i ? ($h{type} = 0x82) : ($h{type} = 0x83);
} elsif ($h{pType} =~ /^Apple_Free/i) {
- $h{type} = 0x0;
+ next;
+ #$h{type} = 0x0;
} elsif ($h{pType} =~ /^Apple_HFS/i) {
$h{type} = 0x402;
} elsif ($h{pType} =~ /^Apple_Partition_Map/i) {
@@ -136,6 +146,12 @@ sub read($$) {
} else {
$h{type} = 0x401;
};
+
+ # Let's see if this partition is a driver.
+ foreach (@{$info{ddMap}}) {
+ $_->{ddBlock} == $h{pPBlockStart} and $h{isDriver} = 1;
+ }
+
}
\%h;
} [ $part ];
@@ -191,13 +207,16 @@ sub write($$$;$) {
}
# Since we didn't create any new drivers, let's try and match up our driver records with out partitons and see if any are missing.
- my $i;
+ $info->{bzDrvrCnt} = 0;
my @ddstowrite;
- foreach $i ( 0 .. $info->{bzDrvrCnt} - 1) {
- my $ddBlock = $_->{ddBlock};
- my $dd = $_;
+ my $dd;
+ foreach $dd (@{$info->{ddMap}}) {
foreach (@partstowrite) {
- $ddBlock == $_->{pPBlockStart} and push @ddstowrite, $dd;
+ if ($dd->{ddBlock} == $_->{pPBlockStart}) {
+ push @ddstowrite, $dd;
+ $info->{bzDrvrCnt}++;
+ last;
+ }
}
}
@@ -205,11 +224,11 @@ sub write($$$;$) {
syswrite F, pack($bz_format, @$info{@$bz_fields}), psizeof($bz_format) or return 0;
# ...and now the driver information.
- foreach $i ( 0 .. $info->{bzDrvrCnt} - 1) {
- syswrite F, pack($dd_format, $ddstowrite[$i]{@$dd_fields}), psizeof($dd_format) or return 0;
+ foreach (@ddstowrite) {
+ syswrite F, pack($dd_format, @$_{@$dd_fields}), psizeof($dd_format) or return 0;
}
# zero the rest of the data in the first block.
- foreach $i ( 1 .. (494 - ($info->{bzDrvrCnt} * 8))) {
+ foreach ( 1 .. (494 - ((@ddstowrite) * 8))) {
syswrite F, "\0", 1 or return 0;
}
#c::lseek_sector(fileno(F), $sector, 512) or return 0;
@@ -285,18 +304,36 @@ sub info {
sub clear_raw {
my ($hd) = @_;
+ my @oldraw = @{$hd->{primary}{raw}};
my $pt = { raw => [ ({}) x 63 ], info => info($hd) };
#- handle special case for partition 1 which is the partition map.
- my $part = {
+ $pt->{raw}[0] = {
type => 0x401,
start => 1,
size => 63,
isMap => 1,
};
+# $pt->{raw}[1] = {
+# type => 0x0,
+# start => 64,
+# size => $hd->{totalsectors} - 64,
+# isMap => 0,
+# };
+ push @{$pt->{normal}}, $pt->{raw}[0];
+# push @{$pt->{normal}}, $pt->{raw}[1];
+
+ #- Recover any Apple Drivers, if any.
+ my $i = 1;
+ foreach (@oldraw) {
+ if (defined $_->{isDriver}) {
+ $pt->{raw}[$i] = $_;
+ push @{$pt->{normal}}, $pt->{raw}[$i];
+ $i++;
+ }
+ };
+ @{$pt->{info}{ddMap}} = @{$hd->{primary}{info}{ddMap}};
- $pt->{raw}[0] = $part;
- push @{$pt->{normal}}, $part;
$pt;
}