aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2017-10-03 23:17:39 +0100
committerPascal Terjan <pterjan@mageia.org>2017-10-03 23:18:29 +0100
commit2d5db438e353a3a396252fa0abd522b0a3a8bfe3 (patch)
tree28cf717ec3568f31cbc9b4f7014e4c33a060860c /lib/Iurt
parentdd266ff2695155b313526d633744a9061d7616d6 (diff)
downloadiurt-2d5db438e353a3a396252fa0abd522b0a3a8bfe3.tar
iurt-2d5db438e353a3a396252fa0abd522b0a3a8bfe3.tar.gz
iurt-2d5db438e353a3a396252fa0abd522b0a3a8bfe3.tar.bz2
iurt-2d5db438e353a3a396252fa0abd522b0a3a8bfe3.tar.xz
iurt-2d5db438e353a3a396252fa0abd522b0a3a8bfe3.zip
Use --urpmi-root also for urpmi.addmedia
This allows adding the media without networking inside the chroot
Diffstat (limited to 'lib/Iurt')
-rw-r--r--lib/Iurt/Urpmi.pm10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index 41186a8..8355a4b 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -209,15 +209,19 @@ sub add_media {
plog("add chroot media: $run->{chrooted_media}");
- if (!perform_command("chroot $chroot urpmi.addmedia $media",
+ my $cmd = "chroot $chroot urpmi.addmedia $media";
+ if ($run->{chrooted_urpmi}) {
+ $cmd = "urpmi-addmedia -v --urpmi-root $chroot $media";
+ }
+ perform_command($cmd,
$run, $config,
mail => $config->{admin},
timeout => 300,
freq => 1,
retry => 2,
use_iurt_root_command => 1,
- debug_mail => $run->{debug})) {
- }
+ debug_mail => $run->{debug})
+ or return;
if (!check_media_added($chroot, $regexp)) {
plog('ERROR', "ERROR iurt could not add media into the chroot");
return;