Mageia Bugzilla – Attachment 11248 Details for
Bug 25224
Diskdrake does not show Mageia Live isos
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Proposed patch
0001-Allow-diskdrake-to-add-partitions-to-Live-ISOs-on-US.patch (text/plain), 2.02 KB, created by
Martin Whitaker
on 2019-08-11 10:42:18 CEST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Martin Whitaker
Created:
2019-08-11 10:42:18 CEST
Size:
2.02 KB
patch
obsolete
>From 330a9840fed32d3b4a1c9479c91edfb2807ff2d4 Mon Sep 17 00:00:00 2001 >From: Martin Whitaker <mageia@martin-whitaker.me.uk> >Date: Sat, 10 Aug 2019 20:40:46 +0100 >Subject: [PATCH] Allow diskdrake to add partitions to Live ISOs on USB sticks > (mga#25224) > > >diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm >index 0492420e8..9b6ade26c 100644 >--- a/perl-install/fs/type.pm >+++ b/perl-install/fs/type.pm >@@ -280,7 +280,7 @@ sub type_subpart_from_magic { > } > > if ($p) { >- $p->{fs_type} = '' if $part->{pt_type} eq 'BIOS_GRUB'; >+ $p->{fs_type} = '' if $part->{pt_type} eq 'BIOS_GRUB' && $p->{fs_type} ne 'iso9660'; > $part->{fs_type_from_magic} = $p->{fs_type}; > $p->{device_LABEL} = $ids->{ID_FS_LABEL} if $ids->{ID_FS_LABEL}; > $p->{device_UUID} = $ids->{ID_FS_UUID} if $ids->{ID_FS_UUID}; >diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm >index 230cdc6a3..6ab40174b 100644 >--- a/perl-install/partition_table.pm >+++ b/perl-install/partition_table.pm >@@ -106,8 +106,10 @@ sub verifyParts { > verifyParts_(get_normal_parts($hd)); > } > sub verifyPrimary { >- my ($pt) = @_; >- $_->{start} > 0 || die "partition must NOT start at sector 0" foreach @{$pt->{normal}}; >+ my ($pt, $o_is_hybrid_iso) = @_; >+ if (!$o_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 8ea1ddb1d..4fca26de4 100644 >--- a/perl-install/partition_table/raw.pm >+++ b/perl-install/partition_table/raw.pm >@@ -246,7 +246,8 @@ sub read_primary { > my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info); > $hd->{primary} = $primary; > undef $hd->{extended}; >- partition_table::verifyPrimary($primary); >+ 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); > 1; > } > >-- >2.21.0 >
From 330a9840fed32d3b4a1c9479c91edfb2807ff2d4 Mon Sep 17 00:00:00 2001 From: Martin Whitaker <mageia@martin-whitaker.me.uk> Date: Sat, 10 Aug 2019 20:40:46 +0100 Subject: [PATCH] Allow diskdrake to add partitions to Live ISOs on USB sticks (mga#25224) diff --git a/perl-install/fs/type.pm b/perl-install/fs/type.pm index 0492420e8..9b6ade26c 100644 --- a/perl-install/fs/type.pm +++ b/perl-install/fs/type.pm @@ -280,7 +280,7 @@ sub type_subpart_from_magic { } if ($p) { - $p->{fs_type} = '' if $part->{pt_type} eq 'BIOS_GRUB'; + $p->{fs_type} = '' if $part->{pt_type} eq 'BIOS_GRUB' && $p->{fs_type} ne 'iso9660'; $part->{fs_type_from_magic} = $p->{fs_type}; $p->{device_LABEL} = $ids->{ID_FS_LABEL} if $ids->{ID_FS_LABEL}; $p->{device_UUID} = $ids->{ID_FS_UUID} if $ids->{ID_FS_UUID}; diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 230cdc6a3..6ab40174b 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -106,8 +106,10 @@ sub verifyParts { verifyParts_(get_normal_parts($hd)); } sub verifyPrimary { - my ($pt) = @_; - $_->{start} > 0 || die "partition must NOT start at sector 0" foreach @{$pt->{normal}}; + my ($pt, $o_is_hybrid_iso) = @_; + if (!$o_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 8ea1ddb1d..4fca26de4 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -246,7 +246,8 @@ sub read_primary { my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info); $hd->{primary} = $primary; undef $hd->{extended}; - partition_table::verifyPrimary($primary); + 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); 1; } -- 2.21.0
View Attachment As Raw
Actions:
View
Attachments on
bug 25224
: 11248