aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xiurt47
1 files changed, 16 insertions, 31 deletions
diff --git a/iurt b/iurt
index 65f3096..a15f668 100755
--- a/iurt
+++ b/iurt
@@ -568,11 +568,6 @@ if (!-d "$local_spool/log") {
}
$run{local_spool} = $local_spool;
-my $cache = {
- queue => {},
-};
-$run{cache} = $cache;
-
if ($run{resume}) {
load_status($local_spool, \%run);
} else {
@@ -581,9 +576,9 @@ if ($run{resume}) {
my (%srpm_version, %provides, %pack_provide, $to_compile, %maint);
$to_compile = @{$run{todo}};
-$to_compile += check_media(\%run, $cache, $config, \%srpm_version,
+$to_compile += check_media(\%run, $config, \%srpm_version,
\%provides, \%pack_provide, \%maint) if $run{media};
-$to_compile += search_packages(1, $cache, \%run, \%maint,
+$to_compile += search_packages(1, \%run, \%maint,
\%srpm_version, @{$run{extra_dir}}) if $run{extra};
$run{to_compile} = $to_compile;
@@ -1105,7 +1100,7 @@ sub check_pid {
}
sub check_media {
- my ($run, $cache, $config, $srpm_version, $provides, $pack_provide, $maint) = @_;
+ my ($run, $config, $srpm_version, $provides, $pack_provide, $maint) = @_;
foreach my $m (keys %{$config->{all_media}}) {
foreach my $subdir (@{$config->{all_media}{$m}}) {
my $synthesis_file = "$config->{repository}/$run->{distro}/$run->{my_arch}/media/$m/$subdir/media_info/synthesis.hdlist.cz";
@@ -1129,7 +1124,7 @@ sub check_media {
#"
my $nb;
foreach my $subdir (@{$config->{all_media}{$run->{media}}}) {
- $nb += search_packages(0, $cache, $run, $maint, $srpm_version, "$config->{repository}/$run->{distro}/SRPMS/$run->{media}/$subdir/");
+ $nb += search_packages(0, $run, $maint, $srpm_version, "$config->{repository}/$run->{distro}/SRPMS/$run->{media}/$subdir/");
}
$nb;
}
@@ -1147,7 +1142,7 @@ sub guess_release_tag_from_status {
}
sub search_packages {
- my ($clean, $cache, $run, $_maint, $srpm_version, @dir) = @_;
+ my ($clean, $run, $_maint, $srpm_version, @dir) = @_;
my ($to_compile, %rep);
plog("iurt search_package: @dir");
# Status is written with the current release tag which may be different
@@ -1173,30 +1168,20 @@ sub search_packages {
#print $run->{status}{$srpm};
#print " $srpm\n";
if ($config->{unwanted_packages} && $srpm =~ /$config->{unwanted_packages}/) { next }
- my $ok = 1;
if (check_version($run, $srpm, $srpm_version)) {
-f "$dir/$srpm" or next;
- 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);
- next;
- }
- my $hdr = RPM4::Header->new("$dir/$srpm");
- my $changelog = $hdr->queryformat("%{CHANGELOGNAME}");
- my ($mail) = $changelog =~ /<(.*@.*)>/;
- $maint{$srpm} = $mail;
- print "$program_name: will try to compile $srpm\n";
- $to_compile++;
- push @{$run->{todo}}, [ $dir , $srpm, 1 ];
+ if (!check_arch("$dir/$srpm", $run{my_arch})) {
+ $run->{status}{$srpm} = 'not_on_this_arch';
+ write_status($local_spool, \%run, $srpm);
+ next;
}
-
- $ok &&= $cache->{queue}{$srpm};
- }
- if ($clean && ($rep{$srpm} || $ok)) {
- print "$program_name: cleaning $dir/$srpm\n";
- unlink "$dir/build/$srpm";
- unlink "$dir/$srpm";
+ my $hdr = RPM4::Header->new("$dir/$srpm");
+ my $changelog = $hdr->queryformat("%{CHANGELOGNAME}");
+ my ($mail) = $changelog =~ /<(.*@.*)>/;
+ $maint{$srpm} = $mail;
+ print "$program_name: will try to compile $srpm\n";
+ $to_compile++;
+ push @{$run->{todo}}, [ $dir , $srpm, 1 ];
}
$rep{$srpm} = 1;
}