summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/MGA/DrakISO/BuildMedia.pm14
-rw-r--r--lib/MGA/DrakISO/BuildRoot.pm9
2 files changed, 21 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);
}
}
diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm
index 9e7b7ef..fe248ba 100644
--- a/lib/MGA/DrakISO/BuildRoot.pm
+++ b/lib/MGA/DrakISO/BuildRoot.pm
@@ -447,6 +447,15 @@ sub build_local_repo {
mkdir_in_root($root, $dst_dir) if ! -d "$root$dst_dir";
copy_file_to_root($root, $dst_dir, undef, $src_path);
$classes{$class} = 1;
+
+ member($pkg->name, @{$build->{system}{local_repo_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.
+ copy_file_to_root($root, $dst_dir, undef, $src_path);
}
print "..generating media info\n" if $::verbose > 1;