summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/TODO12
-rw-r--r--docs/diskdrake.TODO3
-rw-r--r--perl-install/common.pm10
-rw-r--r--perl-install/devices.pm11
-rw-r--r--perl-install/fsedit.pm24
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/partition_table.pm8
7 files changed, 33 insertions, 39 deletions
diff --git a/docs/TODO b/docs/TODO
index 132702743..d7320a4b4 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -1,23 +1,23 @@
in diskdrake, only swap partitions with a ``mount point'' are used.
it should be: all swap for newbie, ask for others?
-do not allow empty password for root, otherwise you can't login :(
+after install, startx does not launch an available window manager
+(kdebase was present, and twm too)
+
+problem with initrd and lilo (computer with scsi). mkbootdisk is ok
xmodmap needed even for english as the backspace is not what it should
remove the hack in pkgs.pm (search for hack)
`Show all' should toggle in package selection
-`Select all' in package selection
+`(Un)Select all' in package selection
help:programs is empty in expert in package selection
left scroll bar is half visible
pb with ghostscript-both & ghostscript-X11...
-pb with gtk_warn and messages with too long
-
-detect and propose to choose devices before diskdrake
-(cf scsi&ewok)
+pb with dependencies ``missing'': icewm do not require XFree86 and so you can have icewm but no X server
/etc/sysconfig/mouse is not created
diff --git a/docs/diskdrake.TODO b/docs/diskdrake.TODO
index 9038a8995..4c0726a2c 100644
--- a/docs/diskdrake.TODO
+++ b/docs/diskdrake.TODO
@@ -1,9 +1,12 @@
+- test what windows can handle (the number of partitions)
- bug when creating smallest partitions (size < 0)
- add warnings for scsi drives if you create more than sdx15
- the information put in save/restore partitions must be cleaned
(remove mounted/formatted/..., also remove the Data::Dumper dependency)
- test, test, test
- integrate ext2resize
+- wanting the first partition to be extended is not used
+- maybe warn if a mounted partition change of dev number
- add the ability to specify primary or extended partitions (in expert mode)
- text version
- better error handling (what to do if we find a bad partition table?)
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 77567726a..449efb922 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -116,6 +116,7 @@ sub translate {
my ($s) = @_;
unless (defined %po::I18N::I18N) {
if (my ($lang) = substr($ENV{LC_ALL} || $ENV{LANGUAGE} || $ENV{LC_MESSAGES} || $ENV{LANG} || '', 0, 2)) {
+ local $@;
local $SIG{__DIE__} = 'none';
eval { require "po/$lang.pm" };
}
@@ -133,12 +134,13 @@ sub warp_text($;$) {
my ($text, $width) = shift;
$width ||= 80;
- my ($t, @l); foreach (split /(\s+)/, $text) {
- if (length "$t$_" > $width) {
+ my ($t, @l); foreach (split /\s+/, $text) {
+ if (length "$t $_" > $width) {
push @l, $t;
- $t = '';
+ $t = $_;
+ } else {
+ $t = "$t $_";
}
- $t .= $_;
}
@l, $t;
}
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index ac72bc3ed..7932eb21b 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -38,13 +38,16 @@ sub size($) {
sub make($) {
local $_ = my $file = $_[0];
my ($type, $major, $minor);
- my ($prefix);
+ my $prefix = '';
- unless (s,^(.*)/(dev|tmp)/,,) {
+ if (m,^(.*)/(dev|tmp)/(.*),) {
$prefix = $1;
- $file = -e "$prefix/dev/$file" ? "$prefix/dev/$file" : "$prefix/tmp/$file";
+ $_ = $3;
+ } elsif (m,/,) {
+ die "can't make device $file";
}
-
+ $file = "$prefix/dev/$_";
+ -e $file or $file = "$prefix/tmp/$_";
-e $file and return $file; # assume nobody takes fun at creating files named as device
if (/^sd(.)(\d{0,2})/) {
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 8edde60bc..ac2126339 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -29,7 +29,7 @@ my @suggestions_mntpoints = qw(/mnt/dos);
sub suggestions_mntpoint($) {
my ($hds) = @_;
- @suggestions_mntpoints, grep { !/swap/ && !has_mntpoint($_, $hds) } map { $_->{mntpoint} } @suggestions;
+ sort @suggestions_mntpoints, grep { !/swap/ && !has_mntpoint($_, $hds) } map { $_->{mntpoint} } @suggestions;
}
sub hds($$) {
@@ -228,33 +228,17 @@ sub undo($) {
}
}
-sub verify_room {
- my ($part, $hd2, $sector2) = @_;
- my $free_sectors = [ 1, $hd2->{totalsectors} ]; # first sector is always occupied by the MBR
- my $remove = sub { removeFromList($_[0]->{start}, $_[0]->{start} + $_[0]->{size}, $free_sectors) };
-
- $_ eq $part or &$remove($_) foreach get_fstab($hd2);
-
- for (my $i = 0; $i < @$free_sectors; $i += 2) {
- $sector2 < $free_sectors->[$i] && $sector2 < $free_sectors->[$i + 1] or next;
- $sector2 + $part->{size} < $free_sectors->[$i + 1] or die
-_("Not enough place to move (%dGb, should be %dGb)", ($free_sectors->[$i + 1] - $free_sectors->[$i]), $part->{size} >> 11);
- return;
- }
- die _("There is already a partition there");
-}
-
sub move {
my ($hd, $part, $hd2, $sector2) = @_;
my $part2 = { %$part };
$part2->{start} = $sector2;
+ $part2->{size} += partition_table::cylinder_size($hd2);
partition_table::remove($hd, $part);
{
- local ($part2->{notFormatted}, $part2->{isFormatted}); # do not allow partition::add to change this
- partition_table::add($hd2, $part2);
+ local ($part2->{notFormatted}, $part2->{isFormatted}); # do not allow partition::add to change this
+ partition_table::add($hd2, $part2);
}
- verify_room($part, $hd2, $part2->{start});
return if $part2->{notFormatted} && !$part2->{isFormatted} || $::testing;
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 41b4e3a65..5a771acb7 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -221,8 +221,8 @@ sub main {
$SIG{__DIE__} = sub { chomp $_[0]; log::l("ERROR: $_[0]") };
# if this fails, it's okay -- it might help with free space though
- unlink "/sbin/install";
- unlink "/sbin/insmod";
+ unlink "/sbin/install" unless $::testing;
+ unlink "/sbin/insmod" unless $::testing;
print STDERR "in second stage install\n";
log::openLog(($::testing || $o->{localInstall}) && 'debug.log');
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index a4bb4bbb8..861c657e2 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -118,9 +118,11 @@ sub adjustStart($$) {
sub adjustEnd($$) {
my ($hd, $part) = @_;
my $end = $part->{start} + $part->{size};
-
- $end = round_down($end, cylinder_size($hd));
- $part->{size} = $end - $part->{start};
+ my $end2 = round_down($end, cylinder_size($hd));
+ unless ($part->{start} < $end2) {
+ $end2 = round_up($end, cylinder_size($hd));
+ }
+ $part->{size} = $end2 - $part->{start};
}
sub adjustStartAndEnd($$) {
&adjustStart;