summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-12-18 21:43:03 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-12-18 21:43:03 +0000
commitf5c43e916dd6970bcc4f0ed28e222696aeec2355 (patch)
treec798c15b7d0b321e0884a2f88c59367227dc46d8
parent35ad16a8096a00fbcf2b22d781765c09c75b1b69 (diff)
downloaddrakx-f5c43e916dd6970bcc4f0ed28e222696aeec2355.tar
drakx-f5c43e916dd6970bcc4f0ed28e222696aeec2355.tar.gz
drakx-f5c43e916dd6970bcc4f0ed28e222696aeec2355.tar.bz2
drakx-f5c43e916dd6970bcc4f0ed28e222696aeec2355.tar.xz
drakx-f5c43e916dd6970bcc4f0ed28e222696aeec2355.zip
diskdrake: fix adding parts to extended partition on hybrid ISO (mga#27862)
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/partition_table.pm4
-rw-r--r--perl-install/partition_table/raw.pm4
3 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 0e37c5e1e..044bc22ab 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- diskdrake:
+ o fix adding parts to extended partition on hybrid ISO (mga#27862)
- drakbug_report:
o also try journalctl for system log
o include draklive-install.log
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 4d77c3cd4..09c8f74d9 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -106,8 +106,8 @@ sub verifyParts {
verifyParts_(get_normal_parts($hd));
}
sub verifyPrimary {
- my ($pt, $o_is_hybrid_iso) = @_;
- if (!$o_is_hybrid_iso) {
+ my ($pt) = @_;
+ if (!$pt->{is_hybrid_iso}) {
$_->{start} > 0 || die "partition must NOT start at sector 0" foreach @{$pt->{normal}};
}
verifyParts_(@{$pt->{normal}}, $pt->{extended});
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index 4fca26de4..453a19c6c 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -244,10 +244,10 @@ sub read_primary {
my ($pt, $info) = eval { $hd->read_one(0) };
$pt or return;
my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info);
+ $primary->{is_hybrid_iso} = $hd->{current_pt_table_type} eq 'dos' && $hd->{fs_type_from_magic} eq 'iso9660';
$hd->{primary} = $primary;
undef $hd->{extended};
- my $is_hybrid_iso = $hd->{current_pt_table_type} eq 'dos' && $hd->{fs_type_from_magic} eq 'iso9660';
- partition_table::verifyPrimary($primary, $is_hybrid_iso);
+ partition_table::verifyPrimary($primary);
1;
}