From 809aafa691fda512945b550c33b2398f297cd6a4 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 3 Oct 2017 19:13:31 +0100 Subject: Kill check_needed It was checking if some buildrequires were not yet built but we are not using iurt like that anymore so all this code is untested and mostly broken --- iurt | 49 +------------------------------------------------ 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/iurt b/iurt index 664173d..23bc21d 100755 --- a/iurt +++ b/iurt @@ -1085,51 +1085,6 @@ exit(); # # -sub check_needed { - my ($srpm, $cache, $provides) = @_; - if (!defined $cache->{needed}{$srpm} && !ref $cache->{needed}{$srpm}) { return 1 } - my $ok = 1; - # migrate old cache format - my $ent = $cache->{needed}{$srpm}; - if (ref $ent eq 'ARRAY') { - my $table = $ent; - $cache->{needed}{$srpm} = {}; - foreach my $t (@$table) { - my ($missing, $version, $maint) = @$t; - $cache->{needed}{$srpm}{$missing} = { - version => $version, - maint => $maint - }; - } - $ent = $cache->{needed}{$srpm}; - } - foreach my $name (keys %$ent) { - my ($package, $version, $maint) = @{$ent->{$name}}{'package', 'version', 'maint'}; - # if packages does not exist anymore, it may have been rebuild, then try to recompute the build dependencies - last if $package && !$provides->{$package}; - my $p_version = $provides->{$name}; - if ($p_version) { - next if $version == $p_version; - next if URPM::ranges_overlap($version, $p_version); - } - $ok = 0; - if ($version) { - $ent->{$name}{version} = $version; - } - my $v = $version; - if ($package) { - plog("ERROR: $srpm needs package $package which requires missing $name $v to be compiled."); - } else { - plog("ERROR: $srpm needs $name $v to be compiled."); - } - # try to recompile it once in a while - last if $cache->{warning}{"install_deps_$srpm"}{$maint}++ % 72; - return 1; - } - delete $cache->{needed}{$srpm} if $ok; - $ok; -} - sub process_queue { my ($config, $run, $wrong_rpm, $o_quiet) = @_; return if !$run->{upload} && $o_quiet; @@ -1343,10 +1298,8 @@ sub search_packages { if ($config->{unwanted_packages} && $srpm =~ /$config->{unwanted_packages}/) { next } my $ok = 1; if (check_version($run, $srpm, $srpm_version)) { - my $check_needed = check_needed($srpm, $cache, $provides); - $run->{status}{$srpm} = 'missing_buildrequires' if !$check_needed; -f "$dir/$srpm" or next; - if (!$cache->{queue}{$srpm} && $check_needed) { + if (!$cache->{queue}{$srpm}) { if (!check_arch("$dir/$srpm", $run{my_arch})) { $run->{status}{$srpm} = 'not_on_this_arch'; write_status($local_spool, \%run, $srpm); -- cgit v1.2.1