From 8a7cebfbb0c09c0c51985a281c93abf8093cacd9 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 18 Aug 2025 15:06:17 +0100 Subject: [PATCH] keg_relocate: add more /usr/local relocation pairs. This should get more of the cases where we install things into HOMEBREW_PREFIX but scoping them to the formula's name to avoid accidental unneccessary relocations preventing `cellar :any` bottles. --- Library/Homebrew/keg_relocate.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index fdbf38f415..883b9b849b 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -97,10 +97,22 @@ class Keg old: "/usr/local/Caskroom", new: "#{PREFIX_PLACEHOLDER}/Caskroom", }, + etc_name: { + old: "/usr/local/etc/#{name}", + new: "#{PREFIX_PLACEHOLDER}/etc/#{name}", + }, var_homebrew: { old: "/usr/local/var/homebrew", new: "#{PREFIX_PLACEHOLDER}/var/homebrew", }, + var_name: { + old: "/usr/local/var/#{name}", + new: "#{PREFIX_PLACEHOLDER}/var/#{name}", + }, + var_log_name: { + old: "/usr/local/var/log/#{name}", + new: "#{PREFIX_PLACEHOLDER}/var/log/#{name}", + }, } end