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.
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.
The new xcodebuild method calls system "xcodebuild" underneath, so this
notice would always be printed. Instead we will just rely on the audit
check.
FixesHomebrew/homebrew#27092.
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.
ClosesHomebrew/homebrew#26277.
The old version worked like this:
fails_with :gcc => '4.8.1'
That wasn't really flexible enough, and made it harder to distinguish
different releases in the same GCC series. Since no one was really
using it yet, this adjusts the syntax to be more similar to the
Apple compilers:
fails_with :gcc => '4.8' do
release '4.8.1'
end
Like with Apple compilers, omitting `release` blacklists the entire
series.
This also unifies the `build` and `version` attributes and accessors,
and exposes them under both names.
* In certain cases, a C++ software may result in linking to a different
and incompatible C++ standard library than its dependencies and still
works fine because it is by design. Examples include GCC, which will
bootstrap itself and self-host after finish.
* Add a cxxstdlib_check method to formula to request changing the C++
standard library checking. Currently using "cxxstdlib_check :skip"
will let a formula skip such checking. This should only be used on
rare occasions and be very careful.
ClosesHomebrew/homebrew#23687.
Declarations of dependencies, options, and resources in the DSL only
apply to specs that have already been initialized. For example, given
this snippet:
url ...
sha1 ...
depends_on 'foo'
devel do
url ...
sha1 ...
end
The dependency 'foo' will be recorded for the stable spec, but not the
devel spec, since it was not initialized prior to the call to
depends_on.
While it is considered best practice to declare all specs (stable,
devel, head, and bottle) prior to other declarations, there is nothing
that enforces this ordering, so when it happens it can be confusing and
hard to debug.
To prevent this, we can initialize all specs up front. This comes with
a performance penalty for commands that load all formulae into memory,
but that is probably outweighed by what we gain in correctness.
FixesHomebrew/homebrew#23425.