3352 Commits

Author SHA1 Message Date
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
Martin Afanasjew
cf3806e747 tap-info: expand and correct help text 2016-07-10 23:20:56 +02:00
Dominyk Tiller
e9925d6177
audit: flag incorrect language/go requires 2016-07-10 21:26:39 +01:00
Dominyk Tiller
1022bcff06
update: mimic doctor permissions advice
We might as well be consistent about it, since it's not obvious to people
what the next step is after we've pointed out the directory isn't writable.

Fixes #476.
2016-07-10 12:41:08 +01:00
Viktor Szakats
df4982ed08 audit.rb: require https for download.savannah.gnu.org (#438)
and download-mirror.savannah.gnu.org
2016-07-10 01:43:27 +01:00
Martin Afanasjew
eba437e153 bottle: revert overeager rename in method call 2016-07-09 16:50:35 +02:00
Mike McQuaid
f1c4141885 keg_relocate: port to generic OS. (#453) 2016-07-09 13:52:05 +01:00
Mike McQuaid
4da990587f tap: run readall when tapping. (#396)
* readall: move readall logic to new class.

* tap: run readall when tapping.

This will prevent tapping an tap with syntax errors from causing issues
for users.

Fixes #58.
2016-07-09 13:51:19 +01:00
Mike McQuaid
2c792076dc cmd/install: port to generic OS. (#458) 2016-07-08 20:52:07 +01:00
Mike McQuaid
86b1df96b9 Autoupdate tweaks (#442)
* Don't infinitely recurse `brew update --preinstall`.

This could happen when trying to `brew install git` inside `brew update
--preinstall`.

* update.sh: cache Git PATH.

We don’t need to look it up from superenv every time; this is slow.

* update.sh: print message before preinstall updates.

* update.sh: verbose output fetch directory.

This aids reading `brew update --verbose --debug` output.

* update.sh: skip taps without formulae on preinstall.

We don’t need to update them as we’re not invoking them.

* update.sh: don't force update-report on developer preinstall.

This is too slow.
2016-07-07 10:24:37 +01:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Andrew Janke
f518f57bd8 gist-logs: truncate log files to be gist-friendly (#279)
Truncates each log file to about 1 MB. This avoids upload and
download errors with the gists, and respects GitHub's suggested
size limits.
2016-07-05 08:45:17 -04:00
Mike McQuaid
59074e91d6 diagnostic: more porting to generic OS. (#449) 2016-07-04 18:35:03 +01:00
Mike McQuaid
a1b0ef1300 Remove unnecessary official command tapping. 2016-07-04 18:26:47 +01:00
Mike McQuaid
bf42959609 Revert "Revert "Test officially supported cmd taps. (#390)""
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
2016-07-04 17:05:37 +01:00
Martin Afanasjew
dba1958bd7 Revert "Test officially supported cmd taps. (#390)"
This reverts commit 252c701c59227c385ef6178fe99523cca8c843bb.

Taps installed prior to running the test suite are not visible to the
test suite as most Homebrew paths are redefined as to not mess up the
local installation.
2016-07-04 17:41:14 +02:00
Mike McQuaid
252c701c59 Test officially supported cmd taps. (#390)
All of these taps use Homebrew internal APIs (or will shortly) and we
autoinstall them all from `brew $CMD`. We should adjust our CI to ensure
that we never accidentally break these taps when making changes to core
code so that these taps can rely more on this core code rather than
having to e.g. vendor equivalent code that never changes on our end.
2016-07-04 16:08:53 +01:00
Mike McQuaid
468ebc5ed5 install: undocument --force-bottle. (#443)
This is a developer-only option I created for testing purposes. It
should not be used by end-users.
2016-07-04 14:03:03 +01:00
Mike McQuaid
3e982b9720 tests: default to testing offline. (#430)
Set HOMEBREW_NO_GITHUB_API to allow running all tests (but search's
integration test specifically for now) offline. This can be overridden
with `--online`.
2016-07-04 13:32:58 +01:00
Martin Afanasjew
a49f3a8e91 style: use RuboCop 0.41.1 (#433)
Tweak `Style/NumericLiteralPrefix` cop settings as we're using octal
literals a lot (both in formulae and the package manager) for file
permissions and aren't ready just yet to transition them to the more
beginner-friendly `0o` prefix (instead of the more obscure `0` prefix).
2016-07-04 07:19:44 +02:00
Mike McQuaid
0478c2fc0f update-report: prune on cask migration. (#428)
Do this to ensure that any symlinks in the Homebrew prefix and/or in
Applications are removed to stop issues with stale symlinks causing
Casks from being installed correctly.
2016-07-03 14:34:38 -05:00
Xu Cheng
d4e8d3df0a
bottle: add --skip-relocation flag to skip keg relocate
This flag is indented to be used in `homebrew/portable` to build vendor
ruby/git/curl.
2016-06-30 15:26:04 +08:00
Tim D. Smith
9b36e83771 Add magic token to hide commands from man page
Closes #402.
2016-06-29 09:01:36 -07:00
Tim D. Smith
be3d33ea36 Document command line options for brew tests 2016-06-29 09:00:46 -07:00
Vlad Shablinsky
da06e813c2
cmd/install: use migration_needed?
Closes #411.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-06-29 21:04:28 +08:00
Martin Afanasjew
d4f5f0cec7 brew.sh: rename 'chdir' to 'safe_cd'
This is inspired by `safe_system` with basically the same implication
(fail on error), making the name a lot less confusing and avoiding a
clash with the `chdir` function previously defined in `bin/brew`.

Closes #414.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-29 13:38:50 +02:00
Zhiming Wang
cb711a2d39 create: add --tap option (#389)
This commit adds a --tap option to the create command such that a user
could create a formula in a specified tap instead of the core.
2016-06-24 08:23:41 +02:00