diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-22 15:59:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-22 15:59:37 +0000 |
commit | 1829b4d804f1c10a23eb58e23d512f6528544a8c (patch) | |
tree | ce9d550112e0e468716415430c4752cd29a28ce5 /lib/Iurt/Urpmi.pm | |
parent | 01804ebf0c6fb9feef30c481a2ffb49826b14e31 (diff) | |
download | iurt-1829b4d804f1c10a23eb58e23d512f6528544a8c.tar iurt-1829b4d804f1c10a23eb58e23d512f6528544a8c.tar.gz iurt-1829b4d804f1c10a23eb58e23d512f6528544a8c.tar.bz2 iurt-1829b4d804f1c10a23eb58e23d512f6528544a8c.tar.xz iurt-1829b4d804f1c10a23eb58e23d512f6528544a8c.zip |
factorize code setting {urpmi_command}
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-rw-r--r-- | lib/Iurt/Urpmi.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 4de91b4..5305135 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -49,6 +49,9 @@ sub new { sub set_command { my ($self, $chroot_tmp) = @_; + set_command__use_distrib($self, $chroot_tmp); +} +sub set_command__use_distrib { $self->{urpmi_command} = "urpmi $self->{urpmi_options} $self->{urpmi_media_options} --root $chroot_tmp"; } @@ -72,7 +75,7 @@ sub urpmi_command { #plog(3, "urpmi_command ($chroot_tmp user $luser)"); if ($run->{chrooted_urpmi}) { - $self->{urpmi_command} = "urpmi $self->{urpmi_options} $self->{urpmi_media_options} --root $chroot_tmp "; + $self->set_command__use_distrib($chroot_tmp); # CM: commented out # this was causing rpm database corruption problems and the packages @@ -164,7 +167,7 @@ sub urpmi_command { $self->{urpmi_command} = "chroot $chroot_tmp urpmi $self->{urpmi_options} "; return 1; } else { - $self->{urpmi_command} = "urpmi $self->{urpmi_options} $self->{urpmi_media_options} --root $chroot_tmp"; + $self->set_command__use_distrib($chroot_tmp); } } |