Jack Nagel
26fe9df9b2
Preserve permissions when using Pathname#atomic_write
2014-03-22 10:58:28 -05:00
Jack Nagel
7f33a84ce6
Expand paths before making relative symlink
...
Fixes Homebrew/homebrew#27702 .
Fixes Homebrew/homebrew#27704 .
2014-03-19 15:57:39 -05:00
Jack Nagel
aa7ed10968
Make relative symlinks in Pathname#install_symlink
...
Closes Homebrew/homebrew#27672 .
2014-03-18 19:03:25 -05:00
Jack Nagel
ca0eff67fa
Inline static exception text to remove a rescue
2014-02-18 13:27:35 -05:00
Jack Nagel
8d5f0d8bb3
Delete unused method
2014-02-12 14:28:26 -05:00
Mike McQuaid
cdbc7c9e53
Pathname: add methods to write env scripts.
2014-01-04 13:19:20 +00:00
Jack Nagel
68f6936070
Move Pathname#dynamically_linked_libraries to mach module
2013-12-14 09:35:58 -06:00
Adam Vandenberg
e523262dfa
monkey around for emacs' code highlighter
...
The abv method has a construct that causes emacs to not highlight
the rest of pathname.rb, so move abv lower in the file.
Sorry.
2013-12-12 08:22:39 -08:00
Adam Vandenberg
7516cee374
+x wrapper scripts, so they work during post-install
2013-12-12 08:21:22 -08:00
Adam Vandenberg
268feffae4
support .lz archives
...
Closes Homebrew/homebrew#24775 .
2013-11-29 15:18:49 -08:00
Jack Nagel
dd06522815
Recognized .pax.gz extension
2013-11-14 16:20:25 -06:00
Jack Nagel
31e0bf61fa
Pathname: removed unused method alias
2013-10-14 22:05:30 -05:00
Mike McQuaid
19852bc47c
Pathname: add cp_path_sub method.
...
This method allows copying a file to a new location by performing a
substitution on the pathname.
2013-10-10 16:46:47 +01:00
Mike McQuaid
caa2f87728
InstallRenamed: don't overwrite etc files; rename.
...
If an etc file exists on installation instead of overwriting it (or
requiring all the manual checks in formula) simply copy it with the
extension `.default` appended.
2013-10-10 16:46:47 +01:00
Jack Nagel
fe31e8ddb4
Use MacOS.locate to find otool
...
Fixes Homebrew/homebrew#23111 .
2013-10-07 21:32:18 -05:00
Misty De Meo
74ab023422
Only track C++ stdlibs for C++ code
...
After a formula is built, scan all mach-o files for dynamic links
to see if any of them point to a C++ stdlib (libc++ or libstdc++).
If one of them is linked, record that information in the formula's tab.
This replaces the old behaviour where all files were assumed to be C++
code, and stdlibs were always tracked regardless of whether they were
actually linked against.
This also modifies the way that tabs are written - now tabs are written
with the stdlib field null, and values are only written if an stdlib
is detected.
2013-10-06 19:26:06 -07:00
Jack Nagel
50d2f632d9
Allow partial installation of resources
2013-09-17 21:29:54 -05:00
Jack Nagel
84cbfb164e
Open files in binary mode where appropriate
2013-09-16 12:50:31 -05:00
Adam Vandenberg
d4cf3ef212
Implement Resources
...
Closes Homebrew/homebrew#20212 .
2013-09-11 22:05:26 -07:00
Adam Vandenberg
7c1671667f
pathname: remove unused return values
...
Return value was used only by one test, rewrote test to know expected value.
2013-08-13 20:41:08 -07:00
Jack Nagel
22365f2f6d
Improve checksum perf by providing an output buffer
2013-08-13 15:40:48 -05:00
Jack Nagel
966e82663f
Make usage of ObserverPathnameExtension more obvious
...
Remove use of globals.
Closes Homebrew/homebrew#21795 .
2013-08-10 19:02:00 -05:00
Jack Nagel
1fb4cd501b
Pathname#write: don't check ARGV.force?
...
Closes Homebrew/homebrew#21390 .
2013-07-22 21:26:42 -05:00
Phil Smith
9942bcc21e
typo
...
Closes Homebrew/homebrew#21385 .
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-07-22 11:24:40 -07:00
Jack Nagel
528e750f7b
Handle NULs in link targets in Pathname#resolved_path_exists?
...
Fixes Homebrew/homebrew#19475 .
Fixes Homebrew/homebrew#21184 .
2013-07-13 16:56:43 -05:00
Jack Nagel
b5d9025d22
Don't use install_p directly
2013-07-06 11:29:33 -05:00
Jack Nagel
7cdf400762
Splatted parameter is always an array
2013-06-20 16:22:55 -05:00
Adam Vandenberg
a60eed48bc
Remove adamv-alt references.
...
Closes Homebrew/homebrew#20364 .
2013-06-09 07:32:06 -07:00
Adam Vandenberg
aff66c3b86
Sniff for non-tarred gzips
...
Don't try to untar non-tarred gzips.
2013-06-08 15:37:32 -07:00
Desmond Brand
ba93e6d363
Overwrite broken symlinks with --overwrite
...
Closes Homebrew/homebrew#19480 .
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-05-09 09:21:34 -05:00
Jack Nagel
16723afaa8
Only remove DS_Store on ENOTEMPTY
2013-04-27 15:21:05 -05:00
Jack Nagel
51bfd4fc1e
Avoid calling to_s on the same Pathname multiple times
2013-04-20 13:50:42 -05:00
Jack Nagel
a78ae63153
Performance fix for Pathname#prepend_prefix
...
See 05a456c231dc6da7cb0f7c70cb21feaf9a0d803c; same story.
2013-04-14 22:38:18 -05:00
Jack Nagel
5e9cfec8b8
Performance fix for Pathname#chop_basename
...
This is an internal method, but is called a bunch of times in
performance-critical codepaths, and is ultra slow because the constant
is interpoplated into the Regexp each time the method is called.
Alas, this has been fixed in Ruby 1.9+.
2013-04-14 21:56:04 -05:00
Jack Nagel
df29049222
Recognize 7z files by magic bytes, not filename
2013-04-03 23:30:32 -05:00
Jack Nagel
ed0a737a39
Adjust BOTTLE_EXTNAME_RX for :snow_leopard_32
2013-03-09 17:38:49 -06:00
Jack Nagel
b38d555030
Fix Regexp encoding under 1.9/2.0
2013-02-10 15:26:07 -06:00
Mike McQuaid
9ba9e749b8
Remove MD5 support.
...
Closes Homebrew/homebrew#17317 .
2013-01-30 22:36:12 -08:00
Mike McQuaid
b58077b3e8
Don't use underscores in (new) bottle filenames.
...
Closes Homebrew/homebrew#14270
2013-01-29 17:14:09 -08:00
Mike McQuaid
1107171f83
Cleanup old bottle syntax.
2013-01-29 17:14:00 -08:00
Shaun Jackman
9a4567c2f9
pathname.rb: Pass -s to du instead of -d0
...
The option `du -s` is equivalent to `du -d0`. The former is a POSIX standard
(IEEE Std 1003.1-2008), whereas the latter is a BSD extension.
From the BSD man page:
`-s Display an entry for each specified file. (Equivalent to -d 0)`
From SUSv4:
`-s Instead of the default output, report only the total sum for each of the specified files.`
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.html
Closes Homebrew/homebrew#16516 .
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2012-12-11 09:32:16 -08:00
Jack Nagel
340769443c
Rewrite plists when installing from a bottle
2012-11-25 15:11:57 -06:00
Mike McQuaid
427bc9d01c
Overwrite plists.
2012-11-25 20:53:04 +00:00
Adam Vandenberg
aecd342a2b
Try to remove a single .DS_Store when uninstalling
...
Closes Homebrew/homebrew#12976 .
Closes Homebrew/homebrew#15975 .
2012-11-14 15:10:08 -08:00
Adam Vandenberg
0172672756
Don't error out if metafiles are linked
...
Closes Homebrew/homebrew#16008 .
2012-11-12 20:56:05 -08:00
Adam Vandenberg
489ebd78d6
Teach Pathname how to scan for metafiles
2012-11-11 10:45:58 -08:00
Sijawusz Pur Rahnama
32b1d46c96
Add support for 7zip archives
...
Closes Homebrew/homebrew#15723 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-10-29 14:57:23 -05:00
Adam Vandenberg
73b3977ab4
Pathname: add exec and jar helpers
...
Closes Homebrew/homebrew#13318 .
2012-10-27 19:28:42 -07:00
Misty De Meo
447f78c0d2
brew ln --force is now brew ln --overwrite
...
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349
* Changes --dry-run to preview linking by default, rather than
overwriting. An overwrite dry-run can be simulated via both
--dry-run --overwrite
* Adds some basic Keg tests
2012-10-20 21:00:46 -05:00
Misty De Meo
dbdf2c78c3
Don't count mkpath in ObserverPathnameExtension
...
mkpathed directories aren't really "linked" or "unlinked" per se,
and link/unlink handle directories differently. It's easier just to
ignore them, which finally synchronizes link/unlink counts.
2012-10-04 21:37:37 -05:00