4470 Commits

Author SHA1 Message Date
Jack Nagel
c84c8b1d0e Set patch name on initialization 2014-03-15 22:40:14 -05:00
Jack Nagel
e0216d95af Prefer opt prefix over linked keg entry when picking active keg 2014-03-15 16:57:37 -05:00
Jack Nagel
3b3b782ba9 Add an extra sanity check 2014-03-15 16:56:51 -05:00
Jack Nagel
13f8c7ab95 Refactor ARGV.kegs 2014-03-15 16:56:40 -05:00
Jack Nagel
088c774d87 diy: warn when detected name is an alias
cf. Homebrew/homebrew#22778.
2014-03-15 12:55:14 -05:00
Jack Nagel
30b4961dde Modernize brew diy 2014-03-15 12:55:14 -05:00
Jack Nagel
e236901e56 Use canonicalized name in NoSuchKegError message
cf. Homebrew/homebrew#22778.
2014-03-15 12:55:14 -05:00
Jack Nagel
eab90dcb56 Rewrite brew reinstall
Fixes Homebrew/homebrew#23928.
2014-03-15 10:53:03 -05:00
Jack Nagel
4e48560701 Detect build-time deps from resource downloads 2014-03-14 23:46:20 -05:00
Jack Nagel
a867cb4305 Use Formula#system and existing error handling in scons helper
Fixes Homebrew/homebrew#27553.
2014-03-14 16:41:57 -05:00
Jack Nagel
251bd707a2 Remove use of Forwardable from ExternalPatch 2014-03-14 16:16:53 -05:00
Mike McQuaid
afec712a86 python_dependency: move bottle check into method. 2014-03-14 18:21:29 +00:00
Jack Nagel
d294d2e210 Fix the debug implementation of Resource#stage as well 2014-03-14 13:05:09 -05:00
Jack Nagel
1599e9b059 Fix Resource#stage method signature in debug mode
Fixes Homebrew/homebrew#27554.
2014-03-14 12:54:17 -05:00
Jack Nagel
72e0d9806b Ensure patch cache path is unique even when checksum is missing 2014-03-14 12:38:06 -05:00
Jack Nagel
c91c2c10d8 Add inspect methods to patch classes 2014-03-13 21:35:41 -05:00
Jack Nagel
a5a78ce3c6 Drop version from cached patch filenames 2014-03-13 21:35:41 -05:00
Jack Nagel
4f051abc3e Teach audit about new patches implementation 2014-03-13 21:35:41 -05:00
Jack Nagel
86cdd812a2 Teach fetch to download patches 2014-03-13 21:35:41 -05:00
Jack Nagel
665b14c4a4 Enable new patch implementation with compatibility layer 2014-03-13 21:35:41 -05:00
Jack Nagel
bc6e4a1894 New patch implementation and DSL
This commit introduces a new patch implementation that supports
checksums and caching.

Patches are declared in blocks:

  patch do
    url ...
    sha1 ...
  end

A strip level of -p1 is assumed. It can be overridden using a symbol
argument:

  patch :p0 do
    url ...
    sha1 ...
  end

Patches can be declared in stable, devel, and head blocks. This form is
preferred over using conditionals.

  stable do
    # ...

    patch do
      url ...
      sha1 ...
    end
  end

Embedded (__END__) patches are declared like so:

  patch :DATA
  patch :p0, :DATA

Patches can also be embedded by passing a string. This makes it possible
to provide multiple embedded patches while making only some of them
conditional.

  patch :p0, "..."
2014-03-13 21:35:41 -05:00
Jack Nagel
f36e676bc9 Don't ignore dependencies when actually building a dependency
Since the primary FormulaInstaller instance handles the entire
dependency tree, we set ignore_deps to true when instantiated the class
for each dependency in over to avoid repeated work.

However, now that arguments for the build process are whitelisted
instead of blacklisted, we have begun adding "--ignore-dependencies" if
ignore_deps is true.

This isn't quite right when we are installing a dependency. We want to
skip the calculation and installation of *its* dependencies, since the
primary installer takes care of that, but we still want to consider them
in the build process, so that they are available in the build
environment.
2014-03-13 19:25:59 -05:00
Jack Nagel
25164350d6 Revert "Roll ignore_deps change back temporarily"
This reverts commit 067f4d474cb158debb8ad7d19d664fb2540cb09f.
2014-03-13 19:10:41 -05:00
Jack Nagel
f0bb1a936d Stop letting GitDependency inject HOMEBREW_PREFIX/bin into the environment 2014-03-13 18:07:11 -05:00
Jack Nagel
4cb3d121a4 Roll ignore_deps change back temporarily 2014-03-13 17:40:22 -05:00
Jack Nagel
c7a54f8da1 Use ARGV.env 2014-03-13 16:37:11 -05:00
Jack Nagel
16fde6fbdb Rewrite postfix conditional 2014-03-13 15:59:54 -05:00
Jack Nagel
0f4f7aa271 Simplify ARGV.filter_for_dependencies 2014-03-13 15:59:54 -05:00
Jack Nagel
3b68723fa8 Make FormulaInstaller setup more readable 2014-03-13 15:59:54 -05:00
Jack Nagel
ce5e2aa65c Make debug an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
4d02849d43 Make verbose an installer mode 2014-03-13 15:59:54 -05:00
Jack Nagel
908d2ba792 Make interactive an installer mode 2014-03-13 15:59:53 -05:00
Jack Nagel
05836649fe Add predicate methods for inspecting the installer mode 2014-03-13 15:59:53 -05:00
Jack Nagel
d1e6f04651 Remove unnecessary check for pour_bottle?
@start_time will be nil if we're pouring a bottle, so we don't need to
also check pour_bottle?.
2014-03-13 15:59:53 -05:00
Jack Nagel
7c62275e13 Whitelist arguments that are passed to build process 2014-03-13 15:59:53 -05:00
Jack Nagel
60caf14ce2 Don't set installer options to their default
ignore_deps and show_header default to false.
2014-03-13 15:59:53 -05:00
Jack Nagel
aa5c023b76 Add ARGV.env 2014-03-13 15:59:53 -05:00
Jack Nagel
d965bbba47 Allow the debugger to work from inside staged resources
References Homebrew/homebrew#23263.
Closes Homebrew/homebrew#27445.
2014-03-13 10:05:57 -05:00
Jack Nagel
7dcb54a963 Set bottle name so brew fetch --retry works 2014-03-13 10:01:01 -05:00
Mike McQuaid
35093b7a37 Revert "software_spec: set a name for bottles."
This reverts commit 7cdcd13aa08ed91a73837b73dc185ad9147f7130.
2014-03-13 13:13:06 +00:00
Mike McQuaid
5d11b5e7a5 software_spec: set a name for bottles.
Avoids errors on `brew fetch --retry` with bottles.
2014-03-13 11:22:33 +00:00
Mike McQuaid
0e52cc6188 bottle: remove pyc files before bottling.
Allows more `cellar :any` bottles.
2014-03-13 10:05:20 +00:00
Mike McQuaid
916e751596 keg: add delete_pyc_files! method. 2014-03-13 10:05:20 +00:00
Mike McQuaid
5b6d872459 python_dependency: always bottle with brew Python. 2014-03-13 10:05:20 +00:00
Mike McQuaid
c789f907eb utils: return empty issues array when no API. 2014-03-13 10:05:20 +00:00
Mike McQuaid
0fd32118c7 requirements: remove unneeded Python27Dependency.
PythonDependency now implies this.
2014-03-12 13:57:10 +00:00
Mike McQuaid
c594053449 python_dependency: fixes, features, cleanup.
- PythonDependency now implies Python 2.7
- PythonDependency now uses brewed Python for bottling
- Use double-quotes everywhere

Closes Homebrew/homebrew#27112.
2014-03-12 13:56:41 +00:00
Mike McQuaid
34edc35b9b Add Language::Python module. 2014-03-12 13:56:27 +00:00
Mike McQuaid
d8ef8d4f82 caveats: recommend Python .pth file instead.
This is better than PYTHONPATH as it doesn't mess with incompatible
versions of Python.

Closes Homebrew/homebrew#27138.
2014-03-12 13:29:19 +00:00
Jack Nagel
9030c19418 Don't chdir just to do a glob 2014-03-11 18:45:55 -05:00