Always put source files in the same directory

There's no point in saving old ones because the debug symbols will only
for the newest bulid anyway.

Currently blows away what was there before, which isn't ideal for a dev
workflow. Maybe that should be changed, given a tar file should be a tar
file, so shouldn't change. But there are many different types of files.
This commit is contained in:
Lukas Oberhuber 2022-07-31 20:54:14 +01:00
parent 8b1eb32e99
commit 93132c6876

View File

@ -42,12 +42,13 @@ class Mktemp
def run def run
if @retain_in_sources if @retain_in_sources
root = "#{HOMEBREW_CACHE}/Sources" source_dir = "#{HOMEBREW_CACHE}/Sources/#{@prefix.tr "@", "AT"}"
FileUtils.mkdir_p root chmod_rm_rf(source_dir) # clear out previous (otherwise not sure what happens)
FileUtils.mkdir_p(source_dir)
@tmpdir = Pathname.new(source_dir)
else else
root = HOMEBREW_TEMP @tmpdir = Pathname.new(Dir.mktmpdir("#{@prefix.tr "@", "AT"}-", HOMEBREW_TEMP))
end end
@tmpdir = Pathname.new(Dir.mktmpdir("#{@prefix.tr "@", "AT"}-", root))
# Make sure files inside the temporary directory have the same group as the # Make sure files inside the temporary directory have the same group as the
# brew instance. # brew instance.