From cfe971a6e3f3260dc64c36db2eae0b3330bfdbde Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 3 Oct 2017 23:20:32 +0100 Subject: Kill unused function --- lib/Iurt/Urpmi.pm | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 8355a4b..401ae91 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -229,40 +229,6 @@ sub add_media { 1; } -# UNUSED: -sub add_packages { - my ($self, $chroot, $_user, @packages) = @_; - my $run = $self->{run}; - my $config = $self->{config}; - if (!perform_command("$self->{urpmi_command} @packages", - $run, $config, - use_iurt_root_command => $self->{use_iurt_root_command}, - timeout => 300, - freq => 1, - retry => 2, - # FIXME: SEGV is _NOT_ OK: - error_ok => [ 11 ], - debug_mail => $run->{debug}, - error_regexp => 'cannot be installed', - wait_regexp => { - 'database locked' => sub { - plog("WARNING: urpmi database locked, waiting..."); - sleep 30; - $self->{wait_limit}++; - if ($self->{wait_limit} > 10) { - #$self->{wait_limit} = 0; - # We can't shoot such command, it's too powerfull. - #system(qq(sudo pkill -9 urpmi &>/dev/null)); - return 0; - } - 1; - } },)) { - plog("ERROR: could not install @packages inside $chroot"); - return 0; - } - 1; -} - sub get_local_provides { my ($self) = @_; my $run = $self->{run}; -- cgit v1.2.1