952 Commits

Author SHA1 Message Date
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
Vlad Shablinsky
072e5df4ed
Cache outdated_versions for Formula
Closes #584.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-08-06 21:25:57 +08:00
Vlad Shablinsky
001bef0604
formula: detect outdated HEAD in outdated_versions 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
a59bdc4a2a
formula: don't return outdated head in installed_prefix 2016-08-06 21:25:56 +08:00
Vlad Shablinsky
1b88c2912b
formula: add new HEAD methods
* add `latest_head_version` to return latest HEAD version installed
* add `latest_head_prefix` to return Pathname with latest HEAD version
* add `head_version_outdated?` to check if HEAD version is up-to-date
2016-08-06 21:25:56 +08:00
Xu Cheng
a8566c9848 various: eliminate the usage of any? (#638)
`any?` is not the opposite of `empty?`. Besides the case that
`[false, nil].any?` will return false, `any?`(O(n)) has much worse
performance than `empty?`(O(1)).
2016-08-05 22:01:32 +08:00
Xu Cheng
e008f6e53c
remove unnecessary build options manipulation for test and postinstall
We already loaded build options in ARGV.resolved_formulae for test and
postinstall
2016-07-18 18:11:53 +08:00
Vlad Shablinsky
4b2c4ef258
Update and test eligible_kegs_for_cleanup
Closes #478.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-16 20:39:14 +08:00
Vlad Shablinsky
3fb5d70a72
Unify Version.create usage
Substitue each Version.new and HeadVersion.new with Version.create
to unify Version and HeadVersion instantiation among core code.

Note that this does not relate to Mac::OS::Version class.
2016-07-16 20:39:13 +08:00
Vlad Shablinsky
2e916110e4
Use HeadVersion for install/reinstall 2016-07-16 20:39:13 +08:00
Xu Cheng
de366f71b9 respect user's curlrc file (#516)
Users may have ~/.curlrc file to include options like proxies.
However, since we overwrite HOME environment variable during the build
and test, curl won't be able to find it.

This commit solves this issue by using CURL_HOME environment variable,
which will be pointed to the original HOME path.

From `curl(1)`:
> 1) curl tries to find the "home dir": It first  checks  for  the
     CURL_HOME and then the HOME environment variables. Failing that,
     it uses getpwuid() on Unix-like systems (which returns the  home
     dir  given the current user in your system). On Windows, it then
     checks for the APPDATA variable, or as a last resort the '%USER-
     PROFILE%\Application Data'.
2016-07-15 20:55:34 +08:00
Vlad Shablinsky
4aedeea96d formula: simplify migration_needed? 2016-07-02 00:29:45 +02:00
Vlad Shablinsky
9c15174e3c
formula: simplify outdated_versions logic 2016-06-29 21:04:27 +08:00
Elliot Saba
e9cc2a5d88 Add "build_dependencies" key to JSON output (#340)
This gives the JSON output the same type of information as
`recommended_dependencies` or `optional_dependencies`, but for those
marked `:build` in the formula.
2016-06-12 02:03:08 +02:00
Mike McQuaid
375efe0945 Remove LLVM-GCC support. (#252)
At this point it's never a good compiler to use so let's just remove it.
2016-05-22 09:40:08 +01:00
Mike McQuaid
95c3a31b33 Revert "Switch to bbatsov's Style Guide since GitHub's is 404" (#250) 2016-05-18 09:44:36 +01:00
Mike McQuaid
aae447996c formula: deprecate startup_plist.
Closes #228.
2016-05-13 08:45:37 +01:00
Martin Afanasjew
4ea2f9dc91 Fix more bad dump_verbose_config references
Follow-up to c7edf9a063dce63afb9ab54b6d71fe864d578365 and related to
changes from #168.
2016-05-08 21:43:57 +02:00
Mike McQuaid
931e292bf1 Make bottle code cross-platform. 2016-05-08 16:51:22 +01:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Andrew Janke
066489a2b3 Switch to bbatsov's Style Guide since GitHub's is 404 (#189)
Fixes #106
2016-05-03 08:13:22 -04:00