aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Urpmi.pm21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm
index d0a34fb..0162462 100644
--- a/lib/Iurt/Urpmi.pm
+++ b/lib/Iurt/Urpmi.pm
@@ -48,6 +48,10 @@ sub new {
sub set_command { &set_command__use_distrib }
+sub set_command__urpmi_root {
+ my ($self, $chroot_tmp) = @_;
+ $self->{urpmi_command} = "urpmi $self->{urpmi_options} --urpmi-root $chroot_tmp";
+}
sub set_command__use_distrib {
my ($self, $chroot_tmp) = @_;
$self->{urpmi_command} = "urpmi $self->{urpmi_options} --use-distrib $self->{distrib_url} --root $chroot_tmp";
@@ -180,6 +184,23 @@ sub check_media_added {
$medias =~ /$media/m;
}
+sub add_media__urpmi_root {
+ my ($self, $chroot) = @_;
+ my $run = $self->{run};
+ my $config = $self->{config};
+ my $cache = $run->{cache};
+
+ 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",
+ $run, $config, $cache,
+ mail => $config->{admin},
+ timeout => 300,
+ freq => 1,
+ retry => 2,
+ debug_mail => $run->{debug});
+}
+
sub add_media {
my ($self, $chroot, $regexp, $media) = @_;
my $run = $self->{run};