Tim D. Smith
54d0043771
Walk entire keg to find object files to relocate
...
Closes Homebrew/homebrew#32772 .
2014-09-29 20:27:13 -07:00
Jack Nagel
fb1250a012
Rescue any SystemCallError from atomic_write
2014-09-25 14:34:38 -05:00
Jack Nagel
2f74d86fcc
Make install name debug output more readable
2014-09-18 21:36:46 -05:00
Jack Nagel
759b6ce1a9
Use safe_system when invoking install_name_tool
2014-09-11 23:26:48 -05:00
Jack Nagel
181654ddaf
Remove two more unnecessary default arguments
2014-08-14 19:58:36 -05:00
Jack Nagel
f743351c60
Cache options hash lookup on the stack
2014-08-09 17:38:45 -05:00
Jack Nagel
5abcfad97e
Fix install names in files in sbin
2014-07-20 18:37:49 -05:00
Jack Nagel
2d8a3ac35a
Use popen wrapper
...
Closes Homebrew/homebrew#30678 .
2014-07-05 15:41:22 -05:00
Jack Nagel
0744ed9410
Store the opt record so we don't have to keep reconstructing it
2014-06-30 20:30:50 -05:00
Jack Nagel
de81350b42
Keg no longer inherits from Pathname
2014-06-26 20:07:11 -05:00
Jack Nagel
3d69e5ab7b
Rename Keg#fname to Keg#name
2014-06-24 19:09:09 -05:00
Jack Nagel
d29d5d7e92
Fix some places where encoding issues manifest on ruby 2.0
2014-06-04 01:37:56 -05:00
Jack Nagel
169aa1ac39
Use correct basename when updating dylib IDs
2014-04-13 14:57:11 -05:00
Jack Nagel
dd9b253b44
Always return a string from dylib_id_for
2014-04-13 14:57:11 -05:00
Jack Nagel
f7f200591c
Fall back to open/write when atomic_write fails
...
Fixes Homebrew/homebrew#28190 .
2014-04-06 00:28:15 -05:00
Jack Nagel
be46fc3a48
Relocate files in share/pkgconfig too
2014-03-29 22:18:48 -05:00
Jack Nagel
3ddd7b8ebb
Calling find on nonexistent directories only works on 1.8
2014-03-29 22:18:48 -05:00
Jack Nagel
685bf070d1
Fix class definition so we can require files first
2014-03-27 22:34:22 -05:00
Jack Nagel
b25156ca4a
Only write files if we actually made a change
2014-03-27 21:42:09 -05:00
Jack Nagel
cb9ee747e0
Fix Keg#find so we don't have to deal with it everywhere
...
lol inheritance
2014-03-27 17:06:05 -05:00
Jack Nagel
ad7911bb75
Replace files atomically when relocating, take two
2014-03-27 14:23:49 -05:00
Jack Nagel
0c99e64851
Revert "Replace files atomically when relocating"
...
There are some weird interactions with ensure_writable and atomic_write
that need to be sorted out.
Fixes Homebrew/homebrew#27917 .
This reverts commit 41c21e6ea5647823a9e589a56f0494b622e26fb2.
2014-03-27 13:45:37 -05:00
Jack Nagel
91d31ae1f4
Replace files atomically when relocating
2014-03-26 16:07:49 -05:00
Jack Nagel
da0df8eabe
Expose some keg methods
2014-03-23 16:01:44 -05:00
Mike McQuaid
3f1cd069c4
keg_fix_install_names: gsub shebangd bottle files.
...
Closes Homebrew/homebrew#27126 .
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-03-03 12:31:25 +00:00
Misty De Meo
edf474cb63
C++ stdlib check: don't check executables for deps
...
This avoids some possible false positives, as happens with, e.g., qt4.
2014-02-02 11:04:30 -08:00
Mike McQuaid
30503cebaa
Revert "detect_cxx_stdlibs: ignore executables."
...
This reverts commit 1cd636d368c66d1346adc1c38633c8f204c759f4.
2014-01-08 07:33:32 +00:00
Mike McQuaid
44d23c8d40
detect_cxx_stdlibs: ignore executables.
2014-01-07 08:49:37 +00:00
Jack Nagel
e29cbc5a48
Drop unnecessary Pathname creation
2013-12-27 16:09:31 -06:00
Jack Nagel
a6602740f8
bottle: extract method for enumerating files that match a string
...
This brings a (small) performance improvement as we yield the files as
they are output by fgrep rather than waiting until fgrep is done to do
any work.
2013-12-17 21:13:23 -06:00
Jack Nagel
ce19fa2223
Unify install name parsing
2013-12-14 09:35:58 -06:00
Jack Nagel
de20814162
keg: use start_with? instead of regexp match
2013-12-14 09:35:58 -06:00
Jack Nagel
c6c7b9b165
Extract HOMEBREW_TEMP constant
2013-12-14 09:35:58 -06:00
Jack Nagel
f458fa9e9a
keg: add debug output to install name machinery
2013-12-14 09:35:58 -06:00
Jack Nagel
c31512fe33
keg: the argument to find_dylib is already a Pathname
2013-12-14 09:35:58 -06:00
Jack Nagel
3662a2765d
keg: combine loops in relocate_install_names
2013-12-14 09:35:58 -06:00
Jack Nagel
f6979cccb2
keg: eliminate reject_proc, make callers determine which names to fix
2013-12-14 09:35:58 -06:00
Jack Nagel
25632546a4
keg: yield install names successively instead of all at once
...
Every caller of install_names_for loops over the yielded array. Now that
we have separated the dylib id calculation and update, we can eliminate
the need for a separate loop and yield each install name individually.
Rename this method to "each_install_name_for" for clarity.
2013-12-14 09:35:57 -06:00
Jack Nagel
b86e98426e
keg: decouple dylib id changes from install name changes
...
The dylib id calculation does not use any information gathered in
install_names_for, so we can pull the logic out completely and only
yield the install names.
2013-12-14 09:35:57 -06:00
Jack Nagel
f4618f0147
keg: factor out dylib id calculation
2013-12-14 09:35:57 -06:00
Jack Nagel
7a10493387
keg: try to avoid disk IO when possible
...
Calling Pathname#text_executable? reads in the first 1024 bytes of the
file, so try the basename check (which requires no filesystem access)
first.
2013-12-14 09:35:57 -06:00
Jack Nagel
24d8791dfb
keg: use lib helper
2013-12-14 09:35:57 -06:00
Jack Nagel
935091cd8e
Pathname#extname returns a string
2013-12-14 09:35:57 -06:00
Elliot Saba
3d76a2c8df
Relocate libtool (.la) files as well as pkgconfig (.pc)
...
Ignore quotes, just do a global substitution on cellar and prefix.
Closes Homebrew/homebrew#24894 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-12-04 22:37:58 -06:00
Jack Nagel
2e89175eef
relocate_install_names: only one substitution is needed
2013-12-04 22:37:58 -06:00
Jack Nagel
ca01b0ad97
relocate_install_names: use a single ensure_writable block
2013-12-04 22:37:57 -06:00
Jack Nagel
cf4e159d53
relocate_install_names: yielded names are already strings
2013-12-04 22:37:57 -06:00
Jack Nagel
e3bd9b2607
Let fix_install_names fix up placeholders too
2013-12-04 22:37:57 -06:00
Jack Nagel
f2aaa5f0ac
Teach installer about prefix and cellar placeholders
2013-12-04 22:37:57 -06:00
Jack Nagel
2b5e57a4bd
Remove special handling for relocatable pkgconfig files
2013-12-04 22:37:57 -06:00