diff options
-rwxr-xr-x | draklive | 10 | ||||
-rw-r--r-- | lib/MDV/Draklive/Utils.pm | 4 |
2 files changed, 7 insertions, 7 deletions
@@ -172,7 +172,7 @@ sub install_system { %{$live->{system}{install_env}}, ); $ENV{DRAKLIVE_LANGS} = join(':', get_langs($live)); - run_({ setarch => $live->{settings}{arch} }, + run_({ targetarch => $live->{settings}{arch} }, 'perl', $drakx_in_chroot, $repository, $live->get_system_root, @@ -253,7 +253,7 @@ sub post_install_system { run_({ root => $live->get_system_root }, 'urpmi.addmedia', if_($_->{distrib}, '--distrib'), $_->{name}, $_->{path}) or die "unable to add media from $_->{path}\n"; @{$_->{packages} || []} or next; - run_({ root => $live->get_system_root, setarch => $live->{settings}{arch} }, + run_({ root => $live->get_system_root, targetarch => $live->{settings}{arch} }, 'urpmi', '--auto', '--no-verify-rpm', if_(!$_->{distrib}, '--searchmedia', $_->{name}), @{$_->{packages}}) or die "unable to install packages from $_->{path}\n"; } @@ -263,7 +263,7 @@ sub post_install_system { my $rpm_tmp_dir = '/tmp/draklive_rpms'; mkdir_p($live->get_system_root . $rpm_tmp_dir); cp_f((map { $live->{settings}{config_root} . '/' . $_ } @{$live->{system}{rpms}}), $live->get_system_root . $rpm_tmp_dir); - run_({ root => $live->get_system_root, setarch => $live->{settings}{arch} }, + run_({ root => $live->get_system_root, targetarch => $live->{settings}{arch} }, 'urpmi', '--auto', '--no-verify-rpm', map { $rpm_tmp_dir . '/' . basename($_) } @{$live->{system}{rpms}}) or die "unable to install additional system rpms\n"; @@ -274,7 +274,7 @@ sub post_install_system { run_({ root => $live->get_system_root }, 'urpmi.removemedia', '-a'); my $erase = join(' ', @{$live->{system}{erase_rpms} || []}); - run_({ root => $live->get_system_root, setarch => $live->{settings}{arch} }, + run_({ root => $live->get_system_root, targetarch => $live->{settings}{arch} }, 'sh', '-c', "rpm -qa $erase | xargs rpm -e ") if $erase; run_({ root => $live->get_system_root }, 'chkconfig', '--del', $_) foreach @{$live->{system}{disable_services}}; @@ -338,7 +338,7 @@ sub post_install_system { } remove_files_from($live->{media}{remove_files}, $live->get_builddir . $live->{prefix}{build}{files}); - run_({ setarch => $live->{settings}{arch} }, + run_({ targetarch => $live->{settings}{arch} }, "chroot", $live->get_system_root, "bash", "-c", $live->{system}{postInstall}) if $live->{system}{postInstall}; clean_system_conf_file($live, "/etc/resolv.conf"); diff --git a/lib/MDV/Draklive/Utils.pm b/lib/MDV/Draklive/Utils.pm index d1499dd..eba97c7 100644 --- a/lib/MDV/Draklive/Utils.pm +++ b/lib/MDV/Draklive/Utils.pm @@ -27,8 +27,8 @@ sub run_ { my $options = ref $_[0] eq 'HASH' ? shift @_ : {}; my @cmd = @_; $options->{timeout} ||= 'never'; - my $setarch = delete $options->{setarch}; - unshift @cmd, 'setarch', $setarch if $setarch; + my $targetarch = delete $options->{targetarch}; + unshift @cmd, 'setarch', $targetarch if $targetarch; print STDERR "running " . (exists $options->{root} && "(in chroot) ") . join(' ', @cmd) . "\n"; run_program::raw($options, @cmd); } |