3989 Commits

Author SHA1 Message Date
Mike McQuaid
dd94aca9eb Merge pull request #703 from MikeMcQuaid/search-remove-cache
search: remove thread-unsafe Hash cache.
2016-08-14 10:00:18 +01:00
Mike McQuaid
611ba62a24 Merge pull request #689 from MikeMcQuaid/update-force
update: add --force argument.
2016-08-14 10:00:06 +01:00
ilovezfs
7c807d347e pull: non-core tap support for Homebrew Testing jobs
`test-bot --ci-testing` supports a `--tap` option for non-core taps, so
`brew pull` should too when pulling Homebrew Testing jobs.
2016-08-13 02:28:33 -07:00
Mike McQuaid
b9efa6336e search: remove thread-unsafe Hash cache.
Doesn't appear to affect the speed of `brew search`.

Fixes #415.
2016-08-12 21:29:49 +01:00
Mike McQuaid
24fb0068e7 update: add --force argument.
Add a `brew update --force` to side-step all of the clever optimisations
we have to detect if an update is unnecessary. That means if those
optimisations go wrong in future we can tell people just to run this
single command.

This would have been a useful workaround for the issue fixed in 985c672.
2016-08-12 14:22:00 +01:00
Mike McQuaid
99837fae47 update.sh: prevent overwriting UPSTREAM_BRANCH.
UPSTREAM_BRANCH was being used both as a loop variable name and name
for the upstream branch for HOMEBREW_REPOSITORY. This meant that the
variable names were overwritten which prevented update.

Closes #693.
2016-08-11 17:22:27 +01:00
Mike McQuaid
24b5db5367 update.sh: further tweak update fix. 2016-08-11 13:47:13 +01:00
Mike McQuaid
985c672bac update.sh: check upstream SHA prefetch not local.
Otherwise this can prevent taps from being updated as expected.
2016-08-11 10:59:35 +01:00
Vlad Shablinsky
7fa9c0e977 Update --fetch-HEAD documentation 2016-08-11 09:30:59 +02:00
Greg Nisbet
bf63c08d50 tests for shell-specific diagnostic message 2016-08-10 23:21:30 -07:00
Greg Nisbet
9a29a306cf resolve conflict in diagnostic.rb 2016-08-10 23:19:09 -07:00
Mike McQuaid
4eaa40ae1f Enable vendored Ruby 2.0. 2016-08-10 20:06:14 +01:00
Mike McQuaid
0c6e307eef update.sh: all configurable HOMEBREW_AUTO_UPDATE_SECS. 2016-08-10 15:37:04 +01:00
Mike McQuaid
1a240cd52a Tweak HOMEBREW_NO_AUTO_UPDATE handling.
This can just live in `brew.sh` and then it doesn’t need repeated in
all the other places.
2016-08-10 15:37:04 +01:00
Mike McQuaid
11116c2467 update.sh: further speed up brew update.
Tweak the logic further to make the no-op case even faster.

Before:
```
brew update  1.10s user 1.05s system 92% cpu 2.325 total
brew update --preinstall  0.60s user 0.77s system 96% cpu 1.433 total
```

After:
```
brew update  0.60s user 0.34s system 83% cpu 1.132 total
brew update --preinstall  0.29s user 0.24s system 62% cpu 0.860 total
```

These times are now fast enough to avoid any further special-casing for
`--preinstall`, roll it out to users by default and not print a message
unless we've actually found some updates.
2016-08-10 15:37:04 +01:00
Misty De Meo
fdf55e77e1 Improve formula not found handling (#96) 2016-08-10 10:37:35 +01:00
Martin Afanasjew
159b0eea35 update: suppress warning about missing FETCH_HEAD
Fixes #671.
2016-08-09 21:19:30 +02:00
Mike McQuaid
2b8ea07979 update: don't recheck taps checked in the last 1m.
This is less than ideal but it gets the time on my machine down from ~6s
to ~2s when checking no taps. It still shows that we're doing way more
in `update.sh` than we need to be doing but that's a future PR.
2016-08-09 13:44:43 +01:00
Martin Afanasjew
3d862ef5e2 cmd/vendor-install.sh: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Martin Afanasjew
1e9328c6e1 cmd/update.sh: fix style inconsistencies 2016-08-08 16:00:12 +02:00
Mike McQuaid
850db4ebf4 search: fix repositories with formulae and casks.
e.g. Caskroom/homebrew-cask.

Thanks to UniqMartin for the fix.

Fixes #655.
2016-08-08 10:55:12 +01:00
Dominyk Tiller
e48a3a2642
audit: enforce include method placement
Closes #648.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-08 00:05:32 +01:00
Dominyk Tiller
11a1c495f7
audit: enforce conflicts_with placement 2016-08-08 00:05:19 +01:00
Uladzislau Shablinski
b8ce1fe1b2 Update upgrade/outdated documentation (#650) 2016-08-06 22:08:35 +08:00
Vlad Shablinsky
9754dbada8
Update upgrade/outdated methods for head versions
Introduce `--fetch-HEAD` option. Without this option upgrade and
outdated never fetch latest upstream commit to detect if HEAD is
outdated -- tabs are used instead. However, if option is passed,
we fetch commit from upstream, which is more time consuming,
but we can be sure that version is up-to-date or outdated.
2016-08-06 21:25:56 +08:00
Mike McQuaid
66d564d885 update-report: tweak Cask migration output.
No longer output every cask under the list of changed formulae but
instead create a dedicated, unprinted report section for casks and then
iterate through that instead.
2016-08-05 16:34:56 +01:00
Mike McQuaid
3f505fe642 update-report: print developer exception backtraces. 2016-08-05 16:34:56 +01:00
Mike McQuaid
a9ab066654 Revert "Partially reverts 4338f35b848ad61462fc4f73e1365e6c002201a2"
This reverts commit b33b1af073979c8a699ed9688dba37fb7e74f0b5.
2016-08-05 15:28:20 +01:00
Xu Cheng
b33b1af073
Partially reverts 4338f35b848ad61462fc4f73e1365e6c002201a2 2016-08-05 22:16:19 +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
Anastasia Sulyagina
4338f35b84 tap: add cask methods. 2016-08-04 11:37:37 +01:00
Mike McQuaid
0302a6bc7c audit: add --new-formula option.
Rather than nudge people to run `--strict` and then ignore some of the
results sometimes (e.g. GitHub repository notability) instead add a
dedicated `--new-formula` option that implies this is a one-time
advisory check.
2016-08-02 12:44:41 +01:00
Mike McQuaid
ebe8b8d328 update-report: use --overwrite to migrate Casks.
`--force` isn't quite what we want here as it'll just allow keg-only
linkage whereas we want to ensure we overwrite anything the Cask
installed.
2016-08-02 11:48:11 +01:00
AnastasiaSulyagina
be5484da8c update-report: allow Casks migration to formulae.
Closes #588.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-08-02 11:45:47 +01:00
Mike McQuaid
2bd5e0e5ad update-report: tweak cask migration text. 2016-08-02 11:45:32 +01:00
Mike McQuaid
3e5ccaf3d2 link: don't allow more openssl/libressl linkage.
This extends the approach in #597 to further prevent linkage of formulae
that conflict with the system OpenSSL and can cause the issues
described in that issue.
2016-07-31 19:12:20 +01:00
Mike McQuaid
164e46a729 Add missing development_tools requires. 2016-07-29 21:21:02 -06:00
Mike McQuaid
b999edb344 link: don't link /usr/local openssl.
See https://langui.sh/2015/07/24/osx-clang-include-lib-search-paths/ for
an explanation and https://gist.github.com/tdsmith/4b502c5cc6e7d358acdf
for reproduction instructions.
2016-07-29 17:00:51 -06:00
Tim D. Smith
c4deed68bd Make method names inquisitive
Closes #592.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-07-27 17:49:49 -07:00
Tim D. Smith
9c0a2ac933 Don't fail on arbitrary absolute symlinks
Still forbid absolute symlinks including prefix
2016-07-27 17:49:49 -07:00
Tim D. Smith
a8cbcfa080 Factor out absolute symlink test 2016-07-27 17:49:49 -07:00
Xu Cheng
d7ee541293
reinstall: handle new options
Since we are loading options as Formula#build from tab, we will have to explicitly read
options from ARGV as well.

Fixes #3066.

Closes #537.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-18 18:11:54 +08:00
Xu Cheng
820b6347b8
remove unnecessary Tab.for_formula
We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
2016-07-18 18:11:53 +08:00
Xu Cheng
b6772c1fde
create: path.version may be nil
Fixes https://github.com/Homebrew/homebrew-core/issues/3067.
2016-07-18 00:03:56 +08:00
Margaret Lewicka
b512834243 audit: prevent crash from nil exitstatus (#532)
If rubocop invocation from brew audit exits with nil exitstatus,
brew audit fails with 'undefined method `>' for nil:NilClass'.
2016-07-16 22:58:47 +02: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
Josh Hagins
4abdeb7b5e update: Don't report formulae that are moved within a tap but not renamed (#480) 2016-07-16 07:18:30 +02:00
Mike McQuaid
0d0519d48d update.sh: fix Git path.
Closes https://github.com/Homebrew/brew/issues/519
Closes https://github.com/Homebrew/homebrew-core/issues/3029
2016-07-15 19:38:27 +01:00
Mike McQuaid
a07ab8bb92 brew.{rb,sh}: move to Library/Homebrew. (#506) 2016-07-15 19:33:30 +01:00
Mike McQuaid
a02be9eea2 ENV: move to new paths. (#507)
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
2016-07-15 19:03:45 +01:00