From 2e35180b270487921e5a6c0ee7cdae3b70f58db3 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Wed, 22 Nov 2023 00:39:07 +0000 Subject: [PATCH] Remove bottle cache hard linking --- lib/test_bot.rb | 6 ------ lib/tests/formulae.rb | 17 ----------------- 2 files changed, 23 deletions(-) diff --git a/lib/test_bot.rb b/lib/test_bot.rb index e517d039..43e25d89 100644 --- a/lib/test_bot.rb +++ b/lib/test_bot.rb @@ -135,12 +135,6 @@ def run!(args) "1589480+BrewTestBot@users.noreply.github.com" Homebrew.failed = !TestRunner.run!(tap, git: GIT, args: args) - ensure - if HOMEBREW_CACHE.exist? - Dir.glob("*.bottle*.tar.gz") do |bottle_file| - FileUtils.rm_f HOMEBREW_CACHE/bottle_file - end - end end end end diff --git a/lib/tests/formulae.rb b/lib/tests/formulae.rb index 41601777..1832bf9a 100644 --- a/lib/tests/formulae.rb +++ b/lib/tests/formulae.rb @@ -280,23 +280,6 @@ def bottle_reinstall_formula(formula, new_formula, args:) test "brew", "bottle", *bottle_merge_args test "brew", "uninstall", "--force", formula.full_name - bottle_json = JSON.parse(@bottle_json_filename.read) - root_url = bottle_json.dig(formula.full_name, "bottle", "root_url") - filename = bottle_json.dig(formula.full_name, "bottle", "tags").values.first["filename"] - - # Test bottle is never uploaded, so we need to stub a cached download. - download_strategy = CurlGitHubPackagesDownloadStrategy.new( - "#{root_url}/#{filename}", - formula.name, - formula.version, - ) - download_strategy.resolved_basename = @bottle_filename.basename.to_s - download_strategy.cached_location.parent.mkpath - FileUtils.ln @bottle_filename, download_strategy.cached_location, force: true - FileUtils.ln_s download_strategy.cached_location.relative_path_from(download_strategy.symlink_location), - download_strategy.symlink_location, - force: true - @testing_formulae.delete(formula.name) unless @unchanged_build_dependencies.empty?