872 Commits

Author SHA1 Message Date
Mike McQuaid
c317c3c31f Merge pull request #1616 from zachwhaley/zsh_functions_caveats
caveats: Differentiate zsh completion files and function files
2016-12-12 13:27:40 +00:00
Uladzislau Shablinski
45ef7ea0b0 Merge pull request #1343 from vladshablinsky/explicit-specs
Allow to install any spec
2016-12-11 14:26:46 +03:00
Zach Whaley
95688cd72e formula: Add convenience method for installing Zsh functions 2016-12-08 07:23:26 -06:00
Zach Whaley
1995f65308 Add a method for installing fish function files
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
2016-12-04 13:21:42 -06:00
Uladzislau Shablinski
52526c962b formula: add new methods
* `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
2016-12-03 04:42:04 +03:00
Alyssa Ross
2b68da8252 formula: runtime deps of build deps aren't runtime
Fixes #1554 (but only for new installations)
2016-11-29 01:39:02 +00:00
Tse Kit Yam
2279751103 Fix broken link 2016-11-24 18:26:01 +08:00
Mike McQuaid
7853406fb4 Merge pull request #1515 from alyssais/formula_cache
Fix flaky tests.
2016-11-18 15:37:49 +00:00
Zhiming Wang
00532a3e3a
formula: update test_fixtures path
Fix regression caused by #1364.
2016-11-17 15:54:51 -05:00
Alyssa Ross
3555206a7f formula: make cache clearing methods, *ahem*, clearer 2016-11-17 14:36:49 +00:00
Mike McQuaid
2ce17a1137 Merge pull request #1082 from alyssais/uninstall_dependancy_error
uninstall: refuse when dependents still installed
2016-11-11 08:23:57 +00:00
Mandar Gokhale
0e15ffff62 Correct a few typos
...and update man pages where applicable
2016-11-03 12:09:44 +00:00
Alyssa Ross
0cd983487c missing_deps: extract formula instance method 2016-10-25 22:34:35 +01:00
Alyssa Ross
6f0aabe707 uninstall: refuse when dependants still installed
Closes #934.
2016-10-25 22:34:34 +01:00
Markus Reiter
31ec04704a Move cask fixtures to test/fixtures/cask. 2016-10-24 15:52:41 +02:00
Uladzislau Shablinski
0ae1785703 formula: use names for formula comparison
* 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.
2016-10-20 03:09:23 +03:00
Markus Reiter
6c6a4c9fa7 RuboCop: Style/AccessorMethodName 2016-09-24 19:28:26 +02:00
Markus Reiter
58e36c7319 Fix Style/GuardClause. 2016-09-24 12:24:35 +02:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Markus Reiter
2b92f907b7 Fix Style/FormatString. 2016-09-23 17:29:29 +02:00
Markus Reiter
fe2d51e0b9 Fix Style/IfUnlessModifier. 2016-09-23 15:30:07 +02:00
Markus Reiter
52ff988530 Fix RuboCop CaseEquality. 2016-09-23 15:30:06 +02:00
ilovezfs
4c358d66a9 formula: help CMake with 10.12 SDK on 10.11
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
2016-09-22 01:37:28 -07:00
Mike McQuaid
b85ee1cb8f Update documentation links. 2016-09-20 10:41:42 +01:00
Alyssa Ross
41e25209f7 Save runtime dependencies in INSTALL_RECEIPT.json
Fixes #930
2016-09-19 20:53:39 +01:00
Mike McQuaid
c9d9e54de6 Fix brew style from #971. 2016-09-19 16:04:32 +01:00
Mike McQuaid
c45119de75 Merge pull request #971 from penman/follow_alias
Make `brew upgrade` and `brew outdated` follow alias changes
2016-09-19 15:22:24 +01:00
Alyssa Ross
6ec14288aa Formulae aren't outdated if replacement formula installed 2016-09-19 02:08:42 +01:00
Alyssa Ross
e12c23faa8 Formula#old_installed_formula?: fix some bugs
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.
2016-09-18 23:59:55 +01:00
Alyssa Ross
49bfb3fb4a Make Formula#installed_alias_target_changed? clearer 2016-09-18 19:58:12 +01:00
Alyssa Ross
2a683f2569 upgrade, outdated: follow alias changes 2016-09-18 19:58:09 +01:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
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.
2016-09-18 19:57:19 +01:00
Alyssa Ross
3d559fa796 Add Formula#installed_alias_path 2016-09-18 19:45:52 +01:00
Mike McQuaid
59b7f16bfd Merge pull request #989 from MikeMcQuaid/rubocop-final
Rubocop: apply auto-corrections and don't use hash-rockets
2016-09-18 13:28:15 +01:00
Mike McQuaid
6693915399 rubocop --auto-correct all remaining files.
But remove some manual `.freeze`s on constants that shouldn't be
constants.
2016-09-17 16:14:13 +01:00
Zhiming Wang
f8d7745547
formula: set TERM to dumb during test
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.
2016-09-17 03:01:47 -04:00
Mike McQuaid
72d10fff0b Use constants for LinkedKegs/PinnedKegs/Locks.
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.
2016-09-15 18:28:42 +01:00
Mike McQuaid
1d66cdd3ad Merge pull request #863 from penman/preserve_alias
Save aliases in INSTALL_RECEIPT
2016-09-09 07:47:05 +01:00
Alyssa Ross
c58bbdc213 Formula#specified_path 2016-09-05 22:13:55 +01:00
Misty De Meo
b2ac693d47 Formula: include Utils::Shell 2016-09-05 14:45:35 +10:00
Alyssa Ross
65ee5408c3 Replace install_name/install_ref with alias_path 2016-09-05 01:19:08 +01:00
Alyssa Ross
0ef3e1e0dc Preserve alias when installing formulae
Part of #567
2016-09-03 21:16:43 +01:00
Vlad Shablinsky
6cff426b4f formula: pinned keg is not eligible for cleanup
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.
2016-09-01 17:46:28 +03:00
Ross Penman
5f1abcf842
docs: fix a typo in plist_options
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.
2016-08-31 20:19:14 +01:00
Zhiming Wang
e82347b233
Restrict TMPDIR etc. changes to install, post_install and test
See discussion in Homebrew/brew#800.
2016-08-26 12:39:27 +08:00
Andrew Janke
5d603c3e8f separate build and test logs 2016-08-19 12:27:37 -04:00
Andrew Janke
954445634c separate build and test logs 2016-08-19 01:04:32 -04:00
Mike McQuaid
27ecf588c7 Rename bottle's revision to rebuild. 2016-08-18 17:32:35 +01:00
Vlad Shablinsky
f085597cbd Use epochs in tabs 2016-08-18 10:38:10 +02:00
Vlad Shablinsky
884a839c71 formula: add epoch 2016-08-18 10:36:28 +02:00