diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-12-17 20:17:08 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-12-17 20:17:08 +0000 |
commit | b39170387f65fe3b3c111035d1df32c960207162 (patch) | |
tree | a04fd819f7139431358057a68b193686603bdc42 /lib/MGA/DrakISO/BuildMedia.pm | |
parent | 3f131c081f0cfdb4677c76d5391b0a76682307ff (diff) | |
download | drakiso-b39170387f65fe3b3c111035d1df32c960207162.tar drakiso-b39170387f65fe3b3c111035d1df32c960207162.tar.gz drakiso-b39170387f65fe3b3c111035d1df32c960207162.tar.bz2 drakiso-b39170387f65fe3b3c111035d1df32c960207162.tar.xz drakiso-b39170387f65fe3b3c111035d1df32c960207162.zip |
Add feature to support both 32 and 64 bit packages in media on the ISOs.
This can be used to support 32-bit UEFI on 64-bit systems.
Diffstat (limited to 'lib/MGA/DrakISO/BuildMedia.pm')
-rw-r--r-- | lib/MGA/DrakISO/BuildMedia.pm | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/MGA/DrakISO/BuildMedia.pm b/lib/MGA/DrakISO/BuildMedia.pm index a1ce11b..02f7049 100644 --- a/lib/MGA/DrakISO/BuildMedia.pm +++ b/lib/MGA/DrakISO/BuildMedia.pm @@ -479,8 +479,18 @@ sub build_installer_media { my $src_path = $medium[0]->{url} . '/' . $pkg->filename; my @path_parts = split('/', $src_path); my $class = $path_parts[-3]; - my $name = $path_parts[-1]; - my $dst_path = $media_dir . $class . '/' . $name; + my $fname = $path_parts[-1]; + my $dst_path = $media_dir . $class . '/' . $fname; + copy_or_link($src_path, $dst_path); + + member($name, @{$build->{biarch_packages}}) or next; + my $xarch = $arch eq 'x86_64' ? 'i586' : 'x86_64'; + # Here we take a shortcut, and assume the identical package exists + # for the other arch. + $src_path =~ s/$arch/$xarch/g; + # This feature only exists to support 32-bit UEFI on 64-bit systems, + # so it's not worth creating a separate medium for the other arch. + $dst_path =~ s/$arch\.rpm/$xarch\.rpm/; copy_or_link($src_path, $dst_path); } } |