aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-04 12:05:48 +0000
committerOlivier Blin <blino@mageia.org>2010-11-04 12:05:48 +0000
commit55e6a8e28afcf433c5b43cf262adc227aa0d40a5 (patch)
treed8e87b5f8d5370134a1848add6214f92e4972542
parent311d6dd6f48488e36db95431951ba6b89ee0081e (diff)
downloadiurt-55e6a8e28afcf433c5b43cf262adc227aa0d40a5.tar
iurt-55e6a8e28afcf433c5b43cf262adc227aa0d40a5.tar.gz
iurt-55e6a8e28afcf433c5b43cf262adc227aa0d40a5.tar.bz2
iurt-55e6a8e28afcf433c5b43cf262adc227aa0d40a5.tar.xz
iurt-55e6a8e28afcf433c5b43cf262adc227aa0d40a5.zip
use iurt_root_command to run chrooted rpm -i and rpmbuild
-rw-r--r--lib/Iurt/Urpmi.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index 0067509..dd55a59 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -619,6 +619,7 @@ sub recreate_srpm {
my %opt = (mail => $config->{admin},
error => "[REBUILD] cannot install $srpm in $chroot_tmp",
+ use_iurt_root_command => 1,
debug_mail => $run->{debug},
hash => "install_$srpm",
retry => $b_retry,
@@ -636,7 +637,7 @@ sub recreate_srpm {
1;
});
plog('DEBUG', "recreating src.rpm...");
- if (!perform_command(qq(sudo chroot $chroot_tmp su $luser -c "rpm -i /home/$luser/rpm/SRPMS/$srpm"),
+ if (!perform_command(qq(chroot $chroot_tmp su $luser -c "rpm -i /home/$luser/rpm/SRPMS/$srpm"),
$run, $config, $cache, %opt)) {
plog("ERROR: chrooting failed (retry $opt{retry}") if $run->{debug};
if ($opt{retry}) {
@@ -661,8 +662,9 @@ sub recreate_srpm {
}
# 20060515 This should not be necessairy any more if urpmi *.spec works, but it doesn't
#
- my $ret = perform_command(qq(sudo chroot $chroot_tmp su $luser -c "rpmbuild --nodeps -bs $with_flags /home/$luser/rpm/SPECS/$spec"),
+ my $ret = perform_command(qq(chroot $chroot_tmp su $luser -c "rpmbuild --nodeps -bs $with_flags /home/$luser/rpm/SPECS/$spec"),
$run, $config, $cache,
+ use_iurt_root_command => 1,
mail => $config->{admin},
error => "[REBUILD] cannot create $srpm in $chroot_tmp",
debug_mail => $run->{debug},