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.
This commit is contained in:
Mike McQuaid 2025-08-18 15:06:17 +01:00
parent 22fdb11e00
commit 8a7cebfbb0
No known key found for this signature in database

View File

@ -97,10 +97,22 @@ class Keg
old: "/usr/local/Caskroom", old: "/usr/local/Caskroom",
new: "#{PREFIX_PLACEHOLDER}/Caskroom", new: "#{PREFIX_PLACEHOLDER}/Caskroom",
}, },
etc_name: {
old: "/usr/local/etc/#{name}",
new: "#{PREFIX_PLACEHOLDER}/etc/#{name}",
},
var_homebrew: { var_homebrew: {
old: "/usr/local/var/homebrew", old: "/usr/local/var/homebrew",
new: "#{PREFIX_PLACEHOLDER}/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 end