702 Commits

Author SHA1 Message Date
Xu Cheng
74ea4bd31c fileutils: use rm_rf to clean temp dir
Honestly, I don't know why git is broken under sandbox. But this seems
fix the problem in Homebrew/homebrew#38978.

Closes Homebrew/homebrew#39138.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-01 15:21:58 +08:00
Misty De Meo
8fe0b56810 Add support for extracting LHA archives 2015-04-26 11:11:56 -07:00
Misty De Meo
f5d6d80d5b ENV.deparallelize: add block form for temporary change
Closes Homebrew/homebrew#39026.
2015-04-25 12:45:31 -07:00
Jack Nagel
2fb9890e07 Don't use deprecated API 2015-04-20 20:49:55 -04:00
Tim D. Smith
af57cffeb0 work around missing __debug header in Xcode CLT 6.3
uses the LLVM 3.6 debug header from:
http://reviews.llvm.org/diffusion/L/browse/libcxx/tags/RELEASE_360/final/include/__debug

Workaround for Homebrew/homebrew#38514.

Closes Homebrew/homebrew#38735.
2015-04-19 13:41:26 -07:00
Xu Cheng
2f529220e7 preliminary write control only sandbox
Closes Homebrew/homebrew#38361.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-09 17:42:54 +08:00
Dominyk Tiller
2fa87369b3 pathname: prune unnecessary whitespace
Closes Homebrew/homebrew#38413.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-04-07 18:32:29 +01:00
Shaun Jackman
6ca42964cb pathname: remove hyphen from BOTTLE_EXTNAME_RX
A hyphen is not a valid character in a Ruby symbol, and the bottle
tag should be a valid Ruby symbol for its use in the bottle stanza.

Closes Homebrew/homebrew#38235.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-31 18:53:26 +01:00
Shaun Jackman
1ad0de8660 pathname: Add [-0-9] to BOTTLE_EXTNAME_RX
Change [a-z_]+(32)? to [-a-z0-9_]+
The Linuxbrew bottle tag is x86_64-linux.

Closes Homebrew/homebrew#32687.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-03-31 15:07:46 +01:00
Jack Nagel
96f7a8015f Pass around only pathname objects 2015-03-26 22:22:45 -04:00
Jack Nagel
3721e0be6f Always yield a path from install_p extension 2015-03-26 22:22:45 -04:00
Jack Nagel
380b8ce46d Combine assignments 2015-03-25 20:26:04 -04:00
Jack Nagel
1351f67e91 Make install_p and install_symlink_p private 2015-03-24 21:08:12 -04:00
Jack Nagel
ab3d622da2 Always pass basename to install_symlink_p 2015-03-24 21:06:19 -04:00
Jack Nagel
6f0efd6f3d Always pass basename to install_p
Currently, when called with one argument, dst is set to self, i.e. the
directory into which the source file should be moved.

When called with a second argument (for renames), dst is the full path,
including the basename, to the moved file.

Instead, let's always pass the full path, which means we can remove the
branching logic around computing dst.
2015-03-24 21:03:45 -04:00
Jack Nagel
86006ba36b Go through regular logic when installing a file 2015-03-23 21:01:50 -04:00
Jack Nagel
db05618561 Use Dir.mktmpdir instead of shelling out to mktemp
Closes Homebrew/homebrew#37616.
2015-03-14 20:45:21 -04:00
Jack Nagel
316d8d756c Reduce scope of ensure block, remove conditionals 2015-03-10 23:26:54 -04:00
Xu Cheng
144453368e test-bot pathname: use Utils.popen_read instead of backticks
Closes Homebrew/homebrew#37418.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-03-06 22:19:24 +08:00
Xu Cheng
328fa80f41 pathname: skip directory in env_script_all_files
Closes Homebrew/homebrew#37180.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-02-25 20:17:22 +08:00
Jack Nagel
f438af9915 Don't prune cellar paths when cellar is in /opt
Fixes Homebrew/homebrew#35382.
2015-02-07 13:54:33 -05:00
Jack Nagel
120bd43f87 Buffer 16K at a time 2015-01-05 10:45:05 -05:00
Viktor Szakats
fc2818b7a5 Use more https in urls and updated some lost links
Closes Homebrew/homebrew#35531.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-01-04 02:13:16 -05:00
Jack Nagel
318c103802 Remove unnecessary encoding comments
These files do not contain any non-ASCII characters.
2015-01-03 23:44:26 -05:00
Jack Nagel
a955665102 Preserve backtrace from original exception 2014-12-29 15:23:01 -05:00
Jack Nagel
6096ec9568 Unset LIBRARY_PATH before builds
See https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html

Closes Homebrew/homebrew-versions#592.
2014-12-17 14:40:05 -05:00
Jack Nagel
1a69ceaf7e Recognize rpm file magic 2014-12-09 01:22:55 -05:00
Mike McQuaid
52cda8fd80 Allow searching/installing Homebrew Casks.
People want to install things like GIMP using Homebrew so let's make it
easier for them to find a decent installation method.

Closes Homebrew/homebrew#34496.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-11-30 17:59:02 +00:00
Jack Nagel
0578f1ff5a Pull initialization code out of begin block 2014-11-09 18:17:10 -06:00
Jack Nagel
3c9cc18c17 Add ARGV.git? 2014-11-03 21:39:11 -06:00
Jack Nagel
cb09660516 Always set sysroot for Xcode-only systems
Fixes Homebrew/homebrew#33431.
2014-10-29 11:03:54 -05:00
Jack Nagel
aaaab946ec Make inreplace errors fatal
Closes Homebrew/homebrew#32649.
Closes Homebrew/homebrew#32703.
2014-09-28 01:11:31 -05:00
Jack Nagel
cb69f339b8 Intercept calls to sub! in inreplace blocks 2014-09-27 19:11:40 -05:00
Jack Nagel
e409aa3084 Clean up inreplace regexps
- use literal syntax
 - escape interpolated variables
 - remove intermediate variables
 - remove unnecessary capture
2014-09-26 22:35:37 -05:00
Jack Nagel
2d16f8c202 Make Pathname#atomic_write truly atomic
As we know, files cannot be moved across filesystems atomically. In that
case, FileUtils.mv will make a copy. But if we create the temp file in
the same directory as the target, we can avoid this and use File.rename
directly.

Additionally, the rename should be the absolute last step, so that the
original file is preserved if altering ownership and permissions fails.
2014-09-20 17:11:16 -05:00
Jack Nagel
662f887e9a Call reset in the superclass implementation of setup_build_environment 2014-09-18 16:44:20 -05:00
Jack Nagel
c5f2f6b539 Make --cc override the compiler selector 2014-09-18 15:50:54 -05:00
Jack Nagel
04dae13ae7 Replace CompilerQueue with predetermined priority lists 2014-09-18 15:50:54 -05:00
Jack Nagel
ae88549797 Remove fails_with? from the formula instance 2014-09-18 15:50:54 -05:00
Jack Nagel
28c1c4ee15 Use only strings in ENV.x11 2014-09-11 16:56:21 -05:00
Jack Nagel
1c5995776f The build environment should only deal with strings 2014-09-11 16:50:56 -05:00
Jack Nagel
c98fe91f13 Don't directly assign Pathname objects to environment variables
Fixes Homebrew/homebrew#32234.
2014-09-11 16:50:56 -05:00
Jack Nagel
b544f3e5f1 Clear GOBIN in environment setup
Closes Homebrew/homebrew#32014.
2014-09-07 18:39:00 -05:00
Jack Nagel
b14851903c Add a method for retrieving only flags from ARGV 2014-08-29 19:38:32 -05:00
Jack Nagel
db04b04135 Simplify implementation of ARGV.flag? and ARGV.switch? 2014-08-28 22:11:08 -05:00
Jack Nagel
54348f55d8 Use two-argument form of String#slice 2014-08-28 22:11:08 -05:00
Jack Nagel
e18da89f3c Implement ARGV.named in terms of ARGV.options_only 2014-08-28 22:11:08 -05:00
Jack Nagel
7a5e4f5cca ARGV.spec should be private 2014-08-28 21:35:52 -05:00
Mike McQuaid
58cb4444da etc.install: handle recursive directory installs.
We need to install the helper module not just on `etc` but also on all
subdirectories of it too. Also, handle the case where we install
a subdirectory with etc.install.

Closes Homebrew/homebrew#26145.
2014-08-26 08:30:47 +01:00
Jack Nagel
b0c1e5f7d6 Fix redefinition of x11 reader method in superenv 2014-08-24 14:32:10 -05:00