diff options
Diffstat (limited to 'lib/MGA/DrakISO/BuildRoot.pm')
| -rw-r--r-- | lib/MGA/DrakISO/BuildRoot.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/MGA/DrakISO/BuildRoot.pm b/lib/MGA/DrakISO/BuildRoot.pm index 995b419..dd978d4 100644 --- a/lib/MGA/DrakISO/BuildRoot.pm +++ b/lib/MGA/DrakISO/BuildRoot.pm @@ -76,7 +76,7 @@ sub install_live_system { run_as_root('rm', '-rf', $live_root); } mkdir_p($live_root); - run_as_root('chown', 'root.root', $live_root); + run_as_root('chown', 'root:root', $live_root); my $Xserver_pid; my $error_message; @@ -114,7 +114,8 @@ sub install_live_system { symlinkf('media/' . $arch, $chroot . '/tmp/image'); # Because the installer uses the above symlink, relative paths in # the urpmi configuration don't work unless we add this extra link. - symlinkf('media/i586', $chroot . '/tmp/i586') if $arch eq 'x86_64'; + my $xarch = $build->{settings}{arch2}; + symlinkf("media/$xarch", $chroot . "/tmp/$xarch") if $xarch; # If the user has provided an auto-install configuration file, use it, # otherwise construct one. @@ -378,17 +379,18 @@ sub build_local_repo { print "Building local repository\n" if $::verbose > 1; - my $root = $build->get_live_root; - my $arch = $build->{settings}{arch}; + my $root = $build->get_live_root; + my $arch = $build->{settings}{arch}; + my $xarch = $build->{settings}{arch2}; # We aren't going to run in the chroot, so we need to adjust the paths # in the urpmi configuration. - my $base_repository = $build->{settings}{repository}; - my $arch_repository = $base_repository . '/' . $arch; - my $i586_repository = $base_repository . '/' . 'i586'; + my $base_repository = $build->{settings}{repository}; + my $arch_repository = $base_repository . '/' . $arch; + my $xarch_repository = $base_repository . '/' . $xarch; run_as_root('sed', '-i', "s!/tmp/image!$arch_repository!", glob($root . '/etc/urpmi/mediacfg.d/*/url')); run_as_root('sed', '-i', "s!/tmp/image!$arch_repository!", $root . '/etc/urpmi/urpmi.cfg'); - run_as_root('sed', '-i', "s!/tmp/i586!$i586_repository!", $root . '/etc/urpmi/urpmi.cfg') if $arch eq 'x86_64'; + run_as_root('sed', '-i', "s!/tmp/$xarch!$xarch_repository!", $root . '/etc/urpmi/urpmi.cfg') if $xarch; # When we pass a chroot directory to urpmi, it wants a /dev/null in # that root. @@ -451,7 +453,7 @@ sub build_local_repo { $classes{$class} = 1; member($pkg->name, @{$build->{system}{local_repo_biarch_packages}}) or next; - my $xarch = $arch eq 'x86_64' ? 'i586' : 'x86_64'; + my $xarch = $build->{settings}{arch2}; # Here we take a shortcut, and assume the identical package exists # for the other arch. $src_path =~ s/$arch/$xarch/g; |
