aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Urpmi.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-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;