diff options
author | Olivier Blin <blino@mageia.org> | 2011-03-17 22:49:07 +0000 |
---|---|---|
committer | Olivier Blin <blino@mageia.org> | 2011-03-17 22:49:07 +0000 |
commit | 2b6ec2b677916762be4f08affcbd7a726e048ec3 (patch) | |
tree | c889a099c8eb6903d07febbf9fb46ea5af86d166 /lib/Iurt/Urpmi.pm | |
parent | 730974b8fb1489e40c88a09f742f2fd80cca9281 (diff) | |
download | iurt-2b6ec2b677916762be4f08affcbd7a726e048ec3.tar iurt-2b6ec2b677916762be4f08affcbd7a726e048ec3.tar.gz iurt-2b6ec2b677916762be4f08affcbd7a726e048ec3.tar.bz2 iurt-2b6ec2b677916762be4f08affcbd7a726e048ec3.tar.xz iurt-2b6ec2b677916762be4f08affcbd7a726e048ec3.zip |
when building chroot, do not use --distrib but use media from base_media in config
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-rw-r--r-- | lib/Iurt/Urpmi.pm | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 7dff2d4..d22b90d 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -188,21 +188,28 @@ sub check_media_added { } sub add_media__urpmi_root { - my ($self, $chroot) = @_; + my ($self, $chroot, $media) = @_; 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("urpmi-addmedia -v --urpmi-root $chroot --distrib $self->{distrib_url} --probe-synthesis", + foreach my $m (@{$media || []}) { + my $url = $self->{distrib_url} . "/media/" . $m; + my $name = $m; + $name =~ s![/:]!_!g; + plog("adding media $name from $url with option --urpmi-root in chroot $chroot"); + perform_command("urpmi-addmedia -v --urpmi-root $chroot $name $url --probe-synthesis", $run, $config, $cache, mail => $config->{admin}, timeout => 300, use_iurt_root_command => 1, freq => 1, retry => 2, - debug_mail => $run->{debug}); + debug_mail => $run->{debug}) + or return; + } + + 1; } sub add_media { |