diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-22 16:21:26 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-22 16:21:26 +0000 |
commit | 2555e822666eaa44c9e52b62c68e34512612645d (patch) | |
tree | 59f7fa5fc8fa1761fc8950e290dff186ab4a5929 /lib/Iurt | |
parent | 9a9f1c9b58b7286cdb58feb2072a7e4aae48d938 (diff) | |
download | iurt-2555e822666eaa44c9e52b62c68e34512612645d.tar iurt-2555e822666eaa44c9e52b62c68e34512612645d.tar.gz iurt-2555e822666eaa44c9e52b62c68e34512612645d.tar.bz2 iurt-2555e822666eaa44c9e52b62c68e34512612645d.tar.xz iurt-2555e822666eaa44c9e52b62c68e34512612645d.zip |
prepare for --urpmi-root:
- create ->set_command__urpmi_root
(which is an alternative to set_command__use_distrib)
- create ->add_media__urpmi_root
(to be used in build_chroot() when we want to use --urpmi-root instead of
--use-distrib)
Diffstat (limited to 'lib/Iurt')
-rw-r--r-- | lib/Iurt/Urpmi.pm | 21 |
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}; |