3228 Commits

Author SHA1 Message Date
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
Xu Cheng
c2ece46e1b
various: don't assume non-OS X == Linux. 2016-07-14 15:41:09 +08:00
Xu Cheng
43a962a5cd update: git init for core tap as well (#510)
A temporary measure before we decide whether vendor git or not.
2016-07-14 15:39:05 +08:00
Xu Cheng
12c505c093
audit: avoid unnecessary regex
Regex is way slower than normal String#include? and String#start_with?.
Also, we often forget to proper escape them. So avoid using them if it
is not necessary.

Closes #503.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-13 19:11:47 +08:00
Xu Cheng
de1049f1f1
various: proper escape dot in regex 2016-07-13 19:11:46 +08:00
Xu Cheng
91fb49d270
various: proper escape in regex 2016-07-13 19:11:46 +08:00
Dominyk Tiller
706b06942f
audit: update ruby dependency advice
Closes #495.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-13 04:55:59 +01:00
Mike McQuaid
ed1d1e51da update.sh: improve verbose output and readability. (#486)
Would have made it easier to debug
https://github.com/Homebrew/homebrew-core/issues/2804 where wasn't clear which
directory was causing the issue.
2016-07-12 19:45:49 +01:00
Mike McQuaid
0d189fae57 superenv: port to generic OS. (#457) 2016-07-12 12:01:20 +01:00
Martin Afanasjew
768ba34b14 style: use RuboCop 0.41.2, adjust defaults (#489)
Changes to our style configuration:

- Consolidate all rules related to Ruby 1.8 compatibility in one place.
- Codify our de-facto preference for `alias_method` over `alias` (drops
  offense count by 54 after turning this on).
- Drop `Style/SignalException` as `only_raise` has been the new default
  for quite a while (since RuboCop 0.37.0).
2016-07-12 07:49:55 +02:00
Xu Cheng
a35e3f1fc1
add vendor-install command 2016-07-11 21:12:56 +08:00
Martin Afanasjew
2c97ae1277 tap-info: expose whether a tap is private
Or how many taps are private when summarizing all installed taps.
2016-07-10 23:20:56 +02:00