9681 Commits

Author SHA1 Message Date
Mike McQuaid
89ebffadec update-report: create top-level directories later.
Otherwise if they are created and empty they may be removed again
before we try to create the `/usr/local/bin/brew` symlink.
2016-09-18 16:06:49 +01:00
Mike McQuaid
e20467971e Merge pull request #963 from MikeMcQuaid/migrate-repository
update-report: migrate /usr/local repository.
2016-09-18 15:41:04 +01:00
Mike McQuaid
ad466452de Merge pull request #1007 from MikeMcQuaid/update-remote-ref
update.sh: turn origin/branch into a variable.
2016-09-18 15:32:44 +01:00
Mike McQuaid
0a09ae30f8 update-report: migrate /usr/local repository.
Migrate a HOMEBREW_REPOSITORY and HOMEBREW_PREFIX of `/usr/local` so
that the HOMEBREW_REPOSITORY is now in `/usr/local/Homebrew`. This gives
us more flexibility on changing the repository layout in future and
avoids putting junk in `/usr/local` when not necessary (e.g. our
`README.md`).
2016-09-18 13:49:02 +01:00
Mike McQuaid
d70841db2b update.sh: turn origin/branch into a variable.
Rather than repeating origin multiple times.
2016-09-18 13:45:32 +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
ilovezfs
56541001a4 Merge pull request #1003 from zmwangx/utils-pathname-to-string
utils: convert formula name from pathname to string
2016-09-17 23:08:49 -07:00
Zhiming Wang
79261148e6 Merge pull request #982 from zmwangx/dumb-term-in-test
formula: set TERM to dumb during test
2016-09-18 00:06:18 -04:00
Zhiming Wang
58b17a0cfc
utils: convert formula name from pathname to string
`name` is passed as argument to Formulary.factory which could later be
downcased at formulary.rb:349, but Pathname doesn't have a downcase
method. Converting `name` to String as it should be fixes the problem.

Fixes #1000.
2016-09-17 23:55:28 -04:00
Mike McQuaid
295e937f27 utils: create missing kegs directories if needed. 2016-09-17 19:23:42 +01:00
Mike McQuaid
eb23a39701 utils: remove bad symlink if it already exists. 2016-09-17 19:02:36 +01:00
Mike McQuaid
5b8329b1c1 Merge pull request #992 from MikeMcQuaid/migrate-legacy-symlinks-harder
Improve legacy symlink migration.
2016-09-17 18:58:00 +01:00
Mike McQuaid
241d7b991b Improve legacy symlink migration.
Read the old symlinks and migrate them across rather than assuming a
unlink/link will work fine (as users have conflicts.)
2016-09-17 18:50:25 +01:00
Mike McQuaid
1bdbb0f462 Improve rescue nesting. 2016-09-17 17:01:04 +01:00
ilovezfs
390bcf413b no_weak_imports: always check for support
ENV.no_weak_imports should be a no-op when Xcode doesn't support the
feature to avoid breaking builds with <= Xcode 7.
2016-09-17 08:29:47 -07:00
Mike McQuaid
69e4ad9809 Add Rubocop TODO list. 2016-09-17 16:14:14 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +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
Mike McQuaid
8f1ae3b28b Move LinkedKegs migration.
Move the `LinkedKegs` migration into `utils.rb` so it can also be called
from `brew.rb` on startup.
2016-09-17 15:00:46 +01:00
Mike McQuaid
224794c761 Merge pull request #984 from MikeMcQuaid/support-sierra
os/mac: officially support Sierra.
2016-09-17 14:09:18 +01:00
Mike McQuaid
e3fe2704eb Merge pull request #983 from MikeMcQuaid/update-force-linkedkegs-migration
Always run LinkedKegs migration (if needed).
2016-09-17 13:29:23 +01:00
Mike McQuaid
8aa18510c4 Always run LinkedKegs migration (if needed).
Ensure that `brew update` always runs the LinkedKegs migration if needed
as it may not have been run by `brew update` if it was using `--preinstall` or
a `git pull` etc.

Also, if the old paths still exist: just use them instead.

Finally, always try to unlink/unpin before link/pin.

Fixes https://github.com/Homebrew/homebrew-core/issues/4918.
2016-09-17 13:25:32 +01:00
Mike McQuaid
43d8b969db os/mac: officially support Sierra.
We have a GM, a bunch of bottles and CI setup.
2016-09-17 12:59:32 +01:00
Mike McQuaid
b1903c1a4a test-bot: generate coverage reports on Sierra.
We may have two Sierra nodes available which could speed up this
relatively slow operation.
2016-09-17 12:55:46 +01:00
Mike McQuaid
10f2bc2dea Merge pull request #973 from MikeMcQuaid/move-repo-links
Move LinkedKegs/PinnedKegs/Locks from Library.
2016-09-17 10:15:13 +01:00
Mike McQuaid
297eeac0d3 Merge pull request #978 from MikeMcQuaid/codecov-no-comments
.codecov.yml: disable GitHub comments.
2016-09-17 10:15:08 +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
Markus Reiter
b62e78a751 .codecov.yml: Include missed (0% covered) files. 2016-09-17 00:12:30 +02:00
Markus Reiter
24aa6a53ca .codecov.yml: Redirect root to Library/Homebrew. 2016-09-17 00:11:55 +02:00
Mike McQuaid
c0998f8287 .codecov.yml: disable GitHub comments.
These are annoying and the status check is sufficient.
2016-09-17 00:11:01 +02:00
Mike McQuaid
1649545cf9 update-test: handle missing master branch.
Ensure it's always created.

Also, re-order `update-test` in `test-bot` (and `readall`) so they are
run before the test suites.
2016-09-16 17:17:50 +01:00
Mike McQuaid
e3609b6fd4 Move LinkedKegs/PinnedKegs/Locks from Library.
These don't make sense to be tied to the `HOMEBREW_REPOSITORY` but
instead should live in the `HOMEBREW_PREFIX` as they all relate to its
state.
2016-09-16 13:51:56 +01:00
Mike McQuaid
b1fba6ed54 Send coverage from Jenkins, don't run OS X Travis.
OS X Travis CI is particularly error-prone, slow and unnecessary for
us when we're already running (fast) OS X builds on Jenkins so use it
just for Linux testing.
2016-09-16 10:20:09 +01:00
Misty De Meo
67cb634e20 Merge pull request #965 from mistydemeo/warn_xcode_8_without_clt
Warn when using Xcode 8 without CLT on 10.11
2016-09-16 16:22:45 +10:00
Misty De Meo
8a0861feab Warn when using Xcode 8 without CLT on 10.11 2016-09-16 13:46:59 +10:00
Mike McQuaid
1c5fa19f84 Merge pull request #966 from MikeMcQuaid/keg-lock-constants
Use constants for LinkedKegs/PinnedKegs/Locks.
2016-09-15 18:57:04 +01: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
ilovezfs
a148aa3a41 Merge pull request #970 from ilovezfs/ac_cv_xcode8
superenv: help Autotools with 10.12 SDK on 10.11
2016-09-15 04:35:22 -07:00
Mike McQuaid
fcb9659052 Merge pull request #967 from MikeMcQuaid/keg-all-top-dirs
keg: add ALL_TOP_LEVEL_DIRECTORIES constant.
2016-09-15 11:49:28 +01:00
ilovezfs
1d7aa1fe0b superenv: help Autotools with 10.12 SDK on 10.11
The GNU Autotools tests for whether a given symbol is defined are
reliably coming to incorrect conclusions on 10.11 with the 10.12 SDK
in Xcode 8. This overrides its decisions by forcing the right answer
in superenv using ac_cv_func_* environment variables and setting them to
"no" on 10.11. The list of problematic symbols is from

  grep 'weak$os10.11' MacOSX.sdk/usr/lib/system/libsystem_c.tbd
2016-09-15 03:34:43 -07:00
Mike McQuaid
e02962f84e Merge pull request #968 from MikeMcQuaid/utils-link-paths
utils: link_src_dst_dirs: paths not files.
2016-09-15 10:10:08 +01:00
Mike McQuaid
842d6ce8bd keg: add ALL_TOP_LEVEL_DIRECTORIES constant.
This is used in diagnostic (and will be used in other places later)
rather than hard-coding other directories later.
2016-09-15 09:20:39 +01:00
Mike McQuaid
9ee4426cf9 utils: link_src_dst_dirs: paths not files.
This can ask for you to remove directories (e.g.
`/usr/local/share/homebrew`) so don’t call this files to avoid
confusion.
2016-09-15 09:19:36 +01:00
Mike McQuaid
2818156280 Merge pull request #954 from aw1621107/require-scons-only-immediate-dep
Make scons use stdenv only if immediate build dep
2016-09-15 09:16:19 +01:00
Mike McQuaid
985e772278 Merge pull request #955 from aw1621107/allow-gcc-HEAD
Teach brew to recognize gcc-HEAD as valid compiler
2016-09-14 20:50:57 +01:00
Alex Wang
4cec6f5dd0 Teach brew to recognize gcc-HEAD as valid compiler
Building gcc with --HEAD results in most of the executables not having a
version suffix, e.g. Building/installing gcc 6 would result in gcc-6,
g++-6, etc. being installed, while building/installing gcc --HEAD would
result in gcc-, g++-, etc. being installed.

The lack of a version suffix prevented brew from recognizing a valid gcc
install, resulting in brew instructing users to install gcc before
building certain formulae even though gcc is installed.

A patch to the gcc formula makes the version number for --HEAD builds
the major version number of the stable version + 1 (7 at this time).
This patch teaches brew to recognize current --HEAD builds as valid
compilers.
2016-09-14 11:42:45 -04:00
Zhiming Wang
54884cd9ce Merge pull request #903 from zmwangx/always-show-dev-commands
cmd/commands: always show developer commands
2016-09-14 02:50:32 -04:00
Dominyk Tiller
278ae8415c Merge pull request #957 from DomT4/xcode_8_stable
xcode: 8.0 is no longer prerelease
2016-09-14 04:29:46 +01:00
Dominyk Tiller
ce359b208d
xcode: 8.0 is no longer prerelease 2016-09-14 03:40:43 +01:00
Dominyk Tiller
95e1ff6a11
pkg-config: update zlib for macOS Sierra 2016-09-14 03:01:47 +01:00