628 Commits

Author SHA1 Message Date
Jack Nagel
7584b2ca2b Aliases never point at symlinks, so just use resolved_path 2014-03-30 15:55:37 -05:00
Jack Nagel
c8c85b4ac4 Always call Process.wait with an argument 2014-03-29 17:47:42 -05:00
Jack Nagel
c27eed10bd Simplify collecting options 2014-03-28 20:42:55 -05:00
Jack Nagel
a487909e9a Don't rely on Dependency#to_s 2014-03-28 20:42:20 -05:00
Jack Nagel
3871165c58 Add revision to brew info --json
Closes Homebrew/homebrew#27820.
2014-03-28 20:41:02 -05:00
Jack Nagel
1c558d49dd Filter arguments for setup.py and build.py 2014-03-28 19:04:31 -05:00
Jack Nagel
56feb978b8 Make ENV changes in the child so we don't have to roll them back 2014-03-28 19:04:05 -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
4b80d30bab Remove used options check from install_bottle?
This is now handled by requiring that options are always passed to the
installer explicitly.
2014-03-10 14:56:02 -05:00
Jack Nagel
7da459874f Make bottle implementation more generic 2014-03-10 14:56:02 -05:00
Jack Nagel
42e60f7c59 Make build_bottle an explicit installer mode 2014-03-10 14:56:01 -05:00
Adam Vandenberg
452d671008 add opt shortcuts to formula 2014-03-07 07:08:52 -08:00
Adam Vandenberg
5cb3b25d43 document formula path helpers 2014-03-07 07:08:52 -08:00
Jack Nagel
d6937c9d3f Oops 2014-03-05 21:11:45 -06:00
Jack Nagel
44dc21ca5d Prepare bottle tooling for formula revisions 2014-03-05 20:45:44 -06:00
Jack Nagel
6008187d5f Encode formula revision in installation prefix
In order to allow kegs built with the same version but differing formula
revisions to coexist, we must encode the revision as part of the keg's
name. This is necessary to actually perform an upgrade, as we cannot
upgrade a keg in-place, and temporarily moving it pending the result of
the upgrade is error-prone and potentially slow.

To accomplish this, we introduce a new Formula#pkg_version method that
concatenates the active_spec version with the formula revision. An
exception is made for a formula that has no revision: the tag is
omitted. This preserves compatibility with existing installations.
2014-03-05 20:12:51 -06:00
Jack Nagel
b5e1715333 Enable tracking of formula revisions
It is useful to be able to prompt upgrades in response to events other
than a version update; for example, when a dependency is updated and its
library version changes, dependents need to be rebuilt to link against
the new library.

Currently we cannot do this automatically, which means a flood of
tickets whenever the library version of a popular library changes.

To address this, we need to track an additional piece of metadata, the
"revision" of the formula, which can be incremented when appropriate to
prompt an upgrade. It can then be reset to zero when the next version
change occurs.
2014-03-05 20:12:51 -06:00
Jack Nagel
6d949599b5 Compare pathnames directly 2014-03-01 18:42:47 -06:00
Jack Nagel
51bec382b0 Make conditional more obvious 2014-03-01 17:49:57 -06:00
Jack Nagel
26785dbe5d Use Formula.path 2014-02-28 16:51:15 -06:00
Jack Nagel
479f4bc7cd Remove deprecation notice from system "xcodebuild"
The new xcodebuild method calls system "xcodebuild" underneath, so this
notice would always be printed. Instead we will just rely on the audit
check.

Fixes Homebrew/homebrew#27092.
2014-02-28 11:04:40 -06:00
Jack Nagel
c72f9a469d Add an xcodebuild helper and deprecate system "xcodebuild"
In the future we can remove the ENV munging branch from Formula#system.

Closes Homebrew/homebrew#27081.
2014-02-27 21:53:21 -06:00
Adam Vandenberg
27365a568d add Formula[]
Closes Homebrew/homebrew#26930
2014-02-27 08:21:14 -08:00
Jack Nagel
d848a6c5fd Add nil check to partially address Homebrew/homebrew#26563 2014-02-24 23:26:11 -05:00
Adam Vandenberg
ed56bdd046 update doc 2014-02-23 15:53:26 -08:00
Adam Vandenberg
1f86923ec2 ignore skip_clean :all 2014-02-23 15:53:26 -08:00
Jack Nagel
85feea33c0 Hoist assignment to simplify a conditional 2014-02-22 21:39:38 -05:00
Jack Nagel
b96411052e Use reader method 2014-02-22 11:17:50 -05:00
Jack Nagel
a2372ad539 Use standard assignment since #initialize is only called once 2014-02-22 11:17:04 -05:00
Jack Nagel
e3e14a0cdf Eliminate nil check on path parameter 2014-02-21 20:07:41 -05:00
Jack Nagel
41a9ba8259 Move Formula.class_s to Formulary 2014-02-21 00:46:03 -05:00
Jack Nagel
fb350bad0f Remove downloader from Formula 2014-02-21 00:41:07 -05:00
Jack Nagel
129e25032b Move methods to a more logical place 2014-02-21 00:41:07 -05:00
Jack Nagel
ccb216c9c7 Delegate downloader to active_spec instead of storing it in an ivar 2014-02-20 13:45:13 -05:00
Jack Nagel
7591b79d7d Push expand_path call down into FromPathLoader 2014-02-19 16:53:18 -05:00
Jack Nagel
63629ab13b Formula#system: simplify xcodebuild special case 2014-02-15 17:47:24 -05:00
Jack Nagel
dca786176e Formula#system: remove unnecessary string casts 2014-02-15 17:47:24 -05:00
Adam Vandenberg
92203ceaca don't trigger VCS when patching
When patching read-only files, patch can try to check-out from
a VCS system when other conditions are met, such as environmental
variables being set.

Homebrew never wants to trigger this behavior, so pass --get=0.

Closes Homebrew/homebrew#26277.
2014-01-29 21:24:30 -08:00
Mike McQuaid
28143fb653 PythonDependency: massive refactoring.
Closes Homebrew/homebrew#24842.
2014-01-20 15:42:52 -08:00
Mike McQuaid
ea1ae32a13 formula: fix whitespace. 2014-01-04 13:19:20 +00:00
Jack Nagel
676f29d757 Drop unnecessary string conversion in skip_clean 2013-12-22 13:43:00 -06:00
Mike McQuaid
2afa1c3b86 tap: change core formula tap naming. 2013-12-14 23:10:20 +00:00
Mike McQuaid
4c2e7b1659 Update docs, comment mxcl/homebrew refs. 2013-12-14 18:18:35 +00:00
Jack Nagel
4f158f23b8 Set bottle version rather than re-parse it from the URL 2013-12-11 01:49:00 -06:00
Jack Nagel
bac0536730 keg_only_reason and cc_failures are not DSL methods 2013-12-09 15:15:53 -06:00
Jack Nagel
e1480953e6 Use accessors to silence uninitalized ivar warnings 2013-12-09 15:15:52 -06:00
Mike McQuaid
0f7ae17699 formula: don't print verify message, use resource.
See discussion:
81d420492c (commitcomment-4804596)
2013-12-08 21:58:03 +00:00
Mike McQuaid
a762f21e33 formula, resource: output when verifying checksum.
References Homebrew/homebrew#24566.
2013-12-08 21:37:40 +00:00