Fish shell allows third-party software vendors to put their own function files in a directory for their software.
For brew installed Fish shell, this is /usr/local/share/fish/vendor_functions.d
* `Formula#linked?` returns true if formula linked
* `Formula#optlinked?` returns true if formula linked to opt
formula installed to the Cellar
* `Formula#prefix_linked?` returns true if linked keg points to the prefix
passed as an argument
* `Formula#linked_version` to get linked version of the formula
* Causes a bug in Formula#installed_alias_target_changed? when
Formula#superseds_an_installed_formula? returns true because
Formula#old_installed_formulae includes f for some Formula f.
* Causes a bug when foo@2.4 with alias foo has HEAD or devel version and
we try to `brew upgrade foo --devel|--HEAD` from stable. The upgrade fails
while since we installing formula to the same prefix it's alredy installed.
The reason for that is that we use
`formula_to_install = outdated.map(&:latest_formula)` in cmd/upgrade
before calling upgrade_formula on foo.
```ruby
def latest_formula
installed_alias_target_changed? ? current_installed_alias_target : self
end
```
Formula#installed_alias_target_changed? compares formulae using
Formula#==, which is wrong for this case, thus Formula#latest_formula doesn't
return self and returns Formula#current_installed_alias_target with spec
foo was initially installed instead of devel or HEAD, causing the error.
This adds a CMake cache entry to std_cmake_args specifying that the
function clock_gettime is not available on 10.11 in order to avoid
runtime errors such as
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
when the build system is confused by Xcode 8's weak symbols.
Other weak symbols on 10.11, which may merit the same treatment in the
future, can be found with
grep 'weak$os10.11' MacOSX.sdk/usr/lib/system/libsystem_c.tbd
Previously, this method would:
- Include the current formula
- Include the current target of the installed alias, which by definition
is not "old"
This commit fixes both of these issues.
Only formulae that are the current target of the alias they were installed
with are now considered to have old installed formulae.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
Software that tries to print different things (e.g. ANSI color) based on
different termcaps often relies on the TERM environment variable, and
could fail without it. This results in confusing test issues where
certain tests can be successfully run by users testing locally with TERM
set, but choke up on our CI.
Always setting TERM to dumb leads to better consistency between local
tests and CI tests, and saves much probing in certain cases.
These definitions are scattered throughout the codebase which makes it
hard to refactor them later (my goal is to move them outside of
HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier
movement later.
If formula is pinned it shouldn't be eligible for cleanup.
Otherwise we can encounter the following behaviour:
1. Install <formula>
2. Pin <formula>
3. <formula> gets outdated
4. Install <other_formula> that depends on <formula>, which requires
up-to-date installation of <formula>. Thus, <formula> gets updated.
5. Now, if we cleanup <formula> we don't remove pin, so it points to
the keg which doesn't exist any longer. The right behaviour is not
to cleanup pinned kegs, which is done in this commit.
Also see #831 for further info.
While using `"true"` instead of `true` wouldn't break anything, it doesn't
seem to be expected, and using `"false"` instead of `false` _would_ break
things.