[Bug #19892] Clean intermediate files regardless -keep_temp

Not to include such files in the result packages.
This commit is contained in:
Nobuyoshi Nakada 2023-09-21 01:30:17 +09:00
parent 7ba88e13e0
commit 7c98d520f4

View File

@ -518,8 +518,7 @@ touch-unicode-files:
end end
vcs.after_export(".") if exported vcs.after_export(".") if exported
clean.concat(Dir.glob("ext/**/autom4te.cache")) clean.concat(Dir.glob("ext/**/autom4te.cache"))
FileUtils.rm_rf(clean) unless $keep_temp clean.add(".downloaded-cache")
FileUtils.rm_rf(".downloaded-cache")
if File.exist?("gems/bundled_gems") if File.exist?("gems/bundled_gems")
gems = Dir.glob("gems/*.gem") gems = Dir.glob("gems/*.gem")
gems -= File.readlines("gems/bundled_gems").map {|line| gems -= File.readlines("gems/bundled_gems").map {|line|
@ -527,10 +526,11 @@ touch-unicode-files:
name, version, _ = line.split(' ') name, version, _ = line.split(' ')
"gems/#{name}-#{version}.gem" "gems/#{name}-#{version}.gem"
} }
FileUtils.rm_f(gems) clean.concat(gems)
else else
FileUtils.rm_rf("gems") clean.add("gems")
end end
FileUtils.rm_rf(clean)
if modified if modified
touch_all(modified, "**/*/", 0) do |name, stat| touch_all(modified, "**/*/", 0) do |name, stat|
stat.mtime > modified stat.mtime > modified