summaryrefslogtreecommitdiffstats
path: root/urpm/main_loop.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-08 18:52:05 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-08 18:52:05 +0000
commitdef552f8ef28f613dc0e6daa2b19d2cab0bdcc09 (patch)
tree51251217a3da47970c37e20b1cb6c53b3cec6a29 /urpm/main_loop.pm
parentd74b89cc3616de79b5a5301e26c5386df79a637e (diff)
downloadurpmi-def552f8ef28f613dc0e6daa2b19d2cab0bdcc09.tar
urpmi-def552f8ef28f613dc0e6daa2b19d2cab0bdcc09.tar.gz
urpmi-def552f8ef28f613dc0e6daa2b19d2cab0bdcc09.tar.bz2
urpmi-def552f8ef28f613dc0e6daa2b19d2cab0bdcc09.tar.xz
urpmi-def552f8ef28f613dc0e6daa2b19d2cab0bdcc09.zip
(_install_src) simplify
Diffstat (limited to 'urpm/main_loop.pm')
-rw-r--r--urpm/main_loop.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/main_loop.pm b/urpm/main_loop.pm
index 8d27ab88..a0d811a6 100644
--- a/urpm/main_loop.pm
+++ b/urpm/main_loop.pm
@@ -133,7 +133,8 @@ sub _install_src {
my ($urpm, $transaction_sources_install, $transaction_sources) = @_;
if (my @l = grep { /\.src\.rpm$/ } values %$transaction_sources_install, values %$transaction_sources) {
my $rpm_opt = $options{verbose} >= 0 ? 'vh' : '';
- system("rpm", "-i$rpm_opt", @l, ($urpm->{root} ? ("--root", $urpm->{root}) : @{[]}));
+ push @l, "--root", $urpm->{root} if $urpm->{root};
+ system("rpm", "-i$rpm_opt", @l);
#- Warning : the following message is parsed in urpm::parallel_*
if ($?) {
$urpm->{print}(N("Installation failed"));