aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Urpmi.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-22 15:59:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-22 15:59:37 +0000
commit1829b4d804f1c10a23eb58e23d512f6528544a8c (patch)
treece9d550112e0e468716415430c4752cd29a28ce5 /lib/Iurt/Urpmi.pm
parent01804ebf0c6fb9feef30c481a2ffb49826b14e31 (diff)
downloadiurt-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.pm7
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);
}
}