aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xiurt_root_command6
-rw-r--r--lib/Iurt/Urpmi.pm3
2 files changed, 8 insertions, 1 deletions
diff --git a/iurt_root_command b/iurt_root_command
index cd0fedd..af51ef5 100755
--- a/iurt_root_command
+++ b/iurt_root_command
@@ -159,6 +159,7 @@ $run{todo} = [];
my %commands_with_more_args = (
"--urpmi" => [ \&urpmi, "urpmi" ],
+ "--urpmi-addmedia" => [ \&urpmi_addmedia, "urpmi.addmedia" ],
"--chroot" => [ \&run_chroot, "chroot" ],
);
@@ -448,6 +449,11 @@ sub urpmi {
return check_urpmi_chroot_options(\@options) && !system('urpmi', @options);
}
+sub urpmi_addmedia {
+ my ($_run, @options) = @_;
+ return check_urpmi_chroot_options(\@options) && !system('urpmi.addmedia', @options);
+}
+
sub run_chroot {
my ($_run, $dir, @options) = @_;
if (!$dir) {
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index dd55a59..83d2d23 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -197,10 +197,11 @@ sub add_media__urpmi_root {
plog("adding distrib $self->{distrib_url} with option --urpmi-root in chroot $chroot");
- perform_command("sudo urpmi.addmedia -v --urpmi-root $chroot --distrib $self->{distrib_url} --probe-synthesis",
+ perform_command("urpmi-addmedia -v --urpmi-root $chroot --distrib $self->{distrib_url} --probe-synthesis",
$run, $config, $cache,
mail => $config->{admin},
timeout => 300,
+ use_iurt_root_command => 1,
freq => 1,
retry => 2,
debug_mail => $run->{debug});