Samuel John
93d9f610bb
python caveats: use >
instead of >>
...
The `homebrew.pth` should be a file with a single line in it.
Also (at least on zsh) if the file does not exist, `>>` will
result in an error. The `>` works in both, bash and zsh and
creates the file with the `echo`ed contet.
Closes Homebrew/homebrew#28201 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-06 10:35:59 -05:00
Jack Nagel
cfee535786
Remove now unnecessary realpath calls
2014-04-06 00:31:07 -05:00
Jack Nagel
d0831c4ef7
Always resolve one symlink when loading formula files
...
This means that tapped formula will always have the correct path, and we
can stop calling realpath everywhere.
2014-04-06 00:31:07 -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
d8bdcf84af
Remove obsolete guards around canonical_name return value
2014-04-05 22:03:49 -05:00
Jack Nagel
20f4b31763
Implement canonical_name in Formulary
2014-04-05 22:03:49 -05:00
Jack Nagel
e891bb4272
Drop support for passing incomplete paths
...
`brew install ./foo` treats `./foo` like `./foo.rb`. This requires
a confusing special case in the name resolution logic and doesn't make
a whole lot of sense from a UX perspective.
Drop support for this. The argument should be an absolute path,
a relative path, or a formula name, rather than a hybrid.
cf. https://github.com/Homebrew/homebrew/issues/23430#issuecomment-26776962
2014-04-05 22:03:40 -05:00
Jack Nagel
0d90deac27
Extract alias resolution to a separate loader class
2014-04-05 22:03:40 -05:00
Jack Nagel
caaa32325c
Use StandardLoader when we know the path already
2014-04-05 22:03:40 -05:00
Jack Nagel
686ab7ad7f
Drop readable? check since we don't do that for any other case
2014-04-05 22:03:40 -05:00
Jack Nagel
757c8ade0b
Simplify tap formula loading
2014-04-05 22:03:40 -05:00
Jack Nagel
e008ceb332
Pass path directly to StandardLoader when possible
...
Now we can avoid computing the path twice in the common case.
2014-04-05 22:03:39 -05:00
Jack Nagel
ca3688e33e
Eliminate repeated work in Formulary.factory
...
Much of the name resolution done in Formula.canonical_name is repeated
Formulary.factory. Here we eliminate the repeated work by duplicating
the code from canonical_name. Later we will refactor it so that both
methods can share the bulk of the logic.
2014-04-05 22:03:39 -05:00
Jack Nagel
2616127a28
Remove unnecessary usage of Formula.canonical_name
2014-04-05 22:03:39 -05:00
Jack Nagel
9b24903875
Guard against nil in inherited_options hash
...
Fixes Homebrew/homebrew#28188 .
2014-04-05 20:02:07 -05:00
Jack Nagel
aa556177f7
Combine conditional branches that do the same thing
2014-04-05 17:41:37 -05:00
Jack Nagel
2b8f1ca94b
FromPathLoader already calls expand_path
2014-04-05 17:41:36 -05:00
Jack Nagel
ce367e711b
Prefer File.extname to regexp
2014-04-05 17:41:36 -05:00
Jack Nagel
8c88d48af7
More correct "symlink already exists" check
2014-04-05 12:17:19 -05:00
Jack Nagel
ce1f598e98
Avoid realpath where it is not necessary
...
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.
2014-04-05 12:17:19 -05:00
Jack Nagel
a44f725c8b
Ignore interrupts while cleaning up
2014-04-05 10:48:54 -05:00
Jack Nagel
309171e4f4
Automatically reinstall up-to-date dependencies that are missing options
...
Closes Homebrew/homebrew#21223 .
2014-04-05 10:48:54 -05:00
Jack Nagel
710db1fb72
Rename outdated_keg to linked_keg
2014-04-05 10:48:54 -05:00
Jack Nagel
e4f41b9b24
Load install receipt before performing any operations on existing kegs
2014-04-05 10:48:54 -05:00
Jack Nagel
1e20d9149b
Ensure build deps are installed for deps with inherited options
...
Fixes Homebrew/homebrew#28144 .
2014-04-05 10:44:54 -05:00
Clemens Gruber
dbe06bbbfc
Add Xcode 5.1.1 (=Golden master build) clang version
...
Closes Homebrew/homebrew#28173 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-05 09:41:30 -05:00
Jack Nagel
dc3691eccd
Clean up some concatentation inside interpolation
2014-04-04 22:02:48 -05:00
Misty De Meo
89692b34a8
Xcode.prefix: remove osx-gcc-installer hack
...
This hack is starting to outlive its usefulness, and produces false
positives.
Fixes Homebrew/homebrew#28147 .
2014-04-04 15:26:41 -07:00
Jack Nagel
7c3c67d722
Need to still check formula build state for some reason
2014-04-04 10:31:27 -05:00
Jack Nagel
611f1a1b42
Fix universal option inheritance during upgrades
2014-04-04 10:14:24 -05:00
Mike McQuaid
efe7fe77a1
python_dependency: don't block pour when :build.
2014-04-04 11:55:36 +01:00
Jack Nagel
2110aa2379
0644 is not executable
2014-04-04 00:07:28 -05:00
Jack Nagel
3bad664c39
Remove need for class name cache by only computing it once per formula
2014-04-03 22:40:40 -05:00
Mike McQuaid
1207ba4f8c
python_dependency: only pour with system python.
...
This is as Python bindings are not build in a way that can have
system or Homebrew Python used interchangeably.
2014-04-03 19:47:15 +01:00
Mike McQuaid
363f2c116c
formula_installer: check pour from requirements.
2014-04-03 19:47:15 +01:00
Mike McQuaid
767da444f9
requirement: add pour_bottle? method.
...
Allows disabling bottles from requirements.
2014-04-03 19:47:15 +01:00
Jack Nagel
33c99123f2
Build the version scanner regexp once
2014-04-03 11:19:57 -05:00
Clemens Müller
fab77a8cbd
Add missing '`' to message of blacklisted rubinius
...
As pointed out by @mikemcquaid in http://git.io/Q5b9wg
Closes Homebrew/homebrew#28106 .
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-04-03 09:34:40 -05:00
Jack Nagel
63da62c6d0
Revert "Audit gnome URLs, prefer download.gnome.org"
...
This reverts commit 557ef8df05a8ea28ed903f08b2009ebc0e218f5a.
2014-04-03 09:29:23 -05:00
Jack Nagel
6b001f1e3b
Add keg-only reason symbols for Xcode 4.3 and Xcode 5
...
Closes Homebrew/homebrew#28095 .
2014-04-03 09:12:51 -05:00
Jack Nagel
d22ad92a84
Remove special behavior of autotools symbol deps
...
Closes Homebrew/homebrew#28094 .
2014-04-03 09:12:25 -05:00
Jack Nagel
c13311ca09
Cache MacOS.version comparison results
...
MacOS.version#<=> is called many, many times during formula loading with
the same half dozen or so arguments. A typical call to this method
involves:
* a hash lookup to convert a symbol argument to a string
* creation of a throw-away Version object wrapping the argument
* the actual version comparison, which is not cheap
This makes it a prime candidate to be memoized.
2014-04-02 20:29:20 -05:00
Jack Nagel
bb5e0812fb
Add fast path for CVS dep
...
The search mechanism in MacOS::Xcode is very slow. It requires shelling
out at least twice, and possibly a third time (in the CLT-only case).
Calling provides_cvs? activates this in order to determine the Xcode
version. But if we know that there isn't an Xcode available for the
current OS that meets the criteria, we can avoid this check entirely.
2014-04-02 19:58:15 -05:00
Jack Nagel
55b0ee787a
Remove dead code
2014-04-01 22:54:15 -05:00
Jack Nagel
8f1f1d8d8a
Make keg_only validation lazy
2014-04-01 21:35:22 -05:00
Jack Nagel
4830bdb5b7
The argument to pkgutil_info is always a string
2014-04-01 20:49:11 -05:00
Jack Nagel
0d3121f781
Batch up mdfind calls when possible
2014-04-01 20:47:26 -05:00
Jack Nagel
97ca3baedc
Avoid calling xcodebuild twice
2014-04-01 18:51:34 -05:00
Jack Nagel
66c8f2707c
Reorganize conditional to avoid shelling out if possible
2014-04-01 18:40:20 -05:00
Jack Nagel
2932bc5347
Remove unused parameter
2014-04-01 16:03:08 -05:00