aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-04 07:42:15 +0000
committerOlivier Blin <blino@mageia.org>2010-11-04 07:42:15 +0000
commitdfe02bbda9d6a9e5646b67e84b9f9f743a098719 (patch)
tree6a67e54579c8ba41d7d828a969dd112b8ce489a6 /lib
parent02ba1840e687c3355051f7180d0793d23e5e628d (diff)
downloadiurt-dfe02bbda9d6a9e5646b67e84b9f9f743a098719.tar
iurt-dfe02bbda9d6a9e5646b67e84b9f9f743a098719.tar.gz
iurt-dfe02bbda9d6a9e5646b67e84b9f9f743a098719.tar.bz2
iurt-dfe02bbda9d6a9e5646b67e84b9f9f743a098719.tar.xz
iurt-dfe02bbda9d6a9e5646b67e84b9f9f743a098719.zip
use iurt_root_command for urpmi commands
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Urpmi.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index 34e7ae5..0067509 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -53,10 +53,12 @@ sub set_command {
}
sub set_command__urpmi_root {
my ($self, $chroot_tmp) = @_;
+ $self->{use_iurt_root_command} = 1;
$self->{urpmi_command} = "urpmi $self->{urpmi_options} --urpmi-root $chroot_tmp";
}
sub set_command__use_distrib {
my ($self, $chroot_tmp) = @_;
+ $self->{use_iurt_root_command} = 1;
$self->{urpmi_command} = "urpmi $self->{urpmi_options} --use-distrib $self->{distrib_url} --root $chroot_tmp";
}
sub set_command__chrooted {
@@ -232,8 +234,9 @@ sub add_packages {
my $run = $self->{run};
my $config = $self->{config};
my $cache = $run->{cache};
- if (!perform_command("sudo $self->{urpmi_command} @packages",
+ if (!perform_command("$self->{urpmi_command} @packages",
$run, $config, $cache,
+ use_iurt_root_command => $self->{use_iurt_root_command},
timeout => 300,
freq => 1,
retry => 2,
@@ -389,9 +392,10 @@ sub install_packages_old {
my $cache = $run->{cache};
my $log_spool = "$local_spool/log/$srpm/";
-d $log_spool or mkdir $log_spool;
- if (!perform_command("sudo $self->{urpmi_command} @packages",
+ if (!perform_command("$self->{urpmi_command} @packages",
$run, $config, $cache,
# mail => $maintainer,
+ use_iurt_root_command => $self->{use_iurt_root_command},
error => $error,
hash => "${log}_$srpm",
srpm => $srpm,
@@ -454,8 +458,9 @@ sub install_packages {
plog('INFO', "install dependencies using urpmi");
if (!perform_command(
- "sudo $self->{urpmi_command} @to_install",
+ "$self->{urpmi_command} @to_install",
$run, $config, $cache,
+ use_iurt_root_command => $self->{use_iurt_root_command},
error => $error,
logname => ${log},
hash => "${log}_$title",