bottle: improve relocation

* skip document for relocatable check
* relocate INSTALL_RECEIPT.json file

Fixes Homebrew/homebrew#41545.

Closes Homebrew/homebrew#41568.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-07-10 19:51:43 +08:00
parent 913659efe4
commit 609af678fd
2 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,9 @@ module Homebrew
result = false
keg.each_unique_file_matching(string) do |file|
# skip document file.
next if Metafiles::EXTENSIONS.include? file.extname
# Check dynamic library linkage. Importantly, do not run otool on static
# libraries, which will falsely report "linkage" to themselves.
if file.mach_o_executable? or file.dylib? or file.mach_o_bundle?

View File

@ -39,6 +39,7 @@ class Keg
end
files = pkgconfig_files | libtool_files | script_files | plist_files
files << tab_file if tab_file.file?
files.group_by { |f| f.stat.ino }.each_value do |first, *rest|
s = first.open("rb", &:read)
@ -207,4 +208,8 @@ class Keg
end
plist_files
end
def tab_file
join(Tab::FILENAME)
end
end