summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2010-03-30 13:26:26 +0000
committerOlivier Blin <oblin@mandriva.com>2010-03-30 13:26:26 +0000
commit0fe21cbf02725393bab23ca690e1aefc91d97de7 (patch)
treec82c3a50a6efa9201da2adf996e1fa9cc22f3c07
parentfc897b858da643419aa9cb5b4de5936d0521349b (diff)
downloaddraklive-0fe21cbf02725393bab23ca690e1aefc91d97de7.tar
draklive-0fe21cbf02725393bab23ca690e1aefc91d97de7.tar.gz
draklive-0fe21cbf02725393bab23ca690e1aefc91d97de7.tar.bz2
draklive-0fe21cbf02725393bab23ca690e1aefc91d97de7.tar.xz
draklive-0fe21cbf02725393bab23ca690e1aefc91d97de7.zip
rename setarch option as targetarch
-rwxr-xr-xdraklive10
-rw-r--r--lib/MDV/Draklive/Utils.pm4
2 files changed, 7 insertions, 7 deletions
diff --git a/draklive b/draklive
index 060a9a5..f2ad052 100755
--- a/draklive
+++ b/draklive
@@ -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);
}