aboutsummaryrefslogtreecommitdiffstats
path: root/modules/buildsystem/templates/cleaner.rb
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-12-31 19:32:50 +0000
committerPascal Terjan <pterjan@mageia.org>2020-12-31 19:36:33 +0000
commit3d8c6dd1e3ae2f90ba6afe9931f4c2104edbed97 (patch)
tree792353a5792622642227ac1e3a25541c60a7ec08 /modules/buildsystem/templates/cleaner.rb
parent9e2728b289c71f062951ee78f6c515cc78c20908 (diff)
downloadpuppet-3d8c6dd1e3ae2f90ba6afe9931f4c2104edbed97.tar
puppet-3d8c6dd1e3ae2f90ba6afe9931f4c2104edbed97.tar.gz
puppet-3d8c6dd1e3ae2f90ba6afe9931f4c2104edbed97.tar.bz2
puppet-3d8c6dd1e3ae2f90ba6afe9931f4c2104edbed97.tar.xz
puppet-3d8c6dd1e3ae2f90ba6afe9931f4c2104edbed97.zip
Fix cleanup to correctly wait for 7d
It was checking if there is another version of the src, but using the name of the package instead of the name of the src, and those are usually different in the case we care most about (libraries).
Diffstat (limited to 'modules/buildsystem/templates/cleaner.rb')
-rwxr-xr-xmodules/buildsystem/templates/cleaner.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/buildsystem/templates/cleaner.rb b/modules/buildsystem/templates/cleaner.rb
index c1d89d7b..e9ff8cb6 100755
--- a/modules/buildsystem/templates/cleaner.rb
+++ b/modules/buildsystem/templates/cleaner.rb
@@ -149,13 +149,13 @@ def check_binaries(srcs, srcages, path, used_srcs)
src = l2[0]
filename = l2[1].rstrip
if ! srcs[src] then
- name = name_from_filename(filename)
- if srcages[name] then
+ srcname = name_from_filename(src)
+ if srcages[srcname] then
# The src.rpm is gone but there is a different version of it
# Only delete old binaries after 7d
- next unless srcages[name][1] < Time.now.to_i - 24*60*60*7
+ next unless srcages[srcname][1] < Time.now.to_i - 24*60*60*7
# Do not delete if the new version of the package hasn't been built for this arch yet
- next unless used_here_srcs[srcages[name][0]]
+ next unless used_here_srcs[srcages[srcname][0]]
end
old_binaries << filename
end