diff options
Diffstat (limited to 'modules/buildsystem/templates/cleaner.rb')
-rwxr-xr-x | modules/buildsystem/templates/cleaner.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/buildsystem/templates/cleaner.rb b/modules/buildsystem/templates/cleaner.rb index 45e683d9..97b91ab0 100755 --- a/modules/buildsystem/templates/cleaner.rb +++ b/modules/buildsystem/templates/cleaner.rb @@ -203,14 +203,12 @@ def check_binaries(arch, srcs, srcages, src_path, path, used_srcs) srcname = name_from_filename(src) if srcages[srcname] then # The src.rpm is gone but there is a different version of it + latestsrc = srcages[srcname][0] # Only delete old binaries after 7d or if there is a new version name = name_from_filename(filename) - next unless (srcages[srcname][1] < Time.now.to_i - 24*60*60*7 || all_versions[name].include?(src)) - # Do not delete newer binaries, upload may be in progress - next unless buildtime < srcages[srcname][1] + next unless (srcages[srcname][1] < Time.now.to_i - 24*60*60*7 || all_versions[name].include?(latestsrc)) # Do not delete if the new version of the package hasn't been built for this arch yet # but still delete it if it is no longer expected to be built. - latestsrc = srcages[srcname][0] next unless (used_here_srcs[latestsrc] || !arch_wanted("#{src_path}/#{latestsrc}", arch)) end old_binaries << filename |