8032 Commits

Author SHA1 Message Date
Xu Cheng
534bf08ec3
brew.sh: new HOMEBREW_RUBY_PATH resolution logic
* Use vendor Ruby if it's present
* Install vendor Ruby for system without Ruby 2.x
2016-07-11 21:12:56 +08:00
Xu Cheng
a35e3f1fc1
add vendor-install command 2016-07-11 21:12:56 +08:00
Xu Cheng
8f178187c0
add file directory for vendor Ruby
The vendor Ruby will be put inside `Library/Homebrew/vendor/portable-ruby/<version>`,
with a symlink `Library/Homebrew/vendor/portable-ruby/current` pointed to it.

In addition, a `Library/Homebrew/vendor/portable-ruby-version` will
track the latest version of vendor binaries.

This gives us version control on vendor Ruby and enables us to bump vendor
Ruby whenever needed such as security update.
2016-07-11 19:23:00 +08:00
Mike McQuaid
ac229f95b5 test_integration_cmds: compile in install test. (#479)
Most of our formulae do compilation so let's do it here too.
2016-07-11 09:20:00 +01: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
64b1822bca
test_language_go: update for HOMEBREW_DEVELOPER odie
Closes #488.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-10 21:26:39 +01:00
Dominyk Tiller
373d927e37
languages/go: die on empty arrays if HOMEBREW_DEVELOPER 2016-07-10 21:26:39 +01:00
Dominyk Tiller
e9925d6177
audit: flag incorrect language/go requires 2016-07-10 21:26:39 +01:00
Martin Afanasjew
ecc329e33f tests: clean up after bottle test
Fix minor regression in b55250c44eacd49646407b26a73753965d4d36d0. The
bottle is placed in the current working directory, is unaffected by the
the single teardown introduced in #475, and thus needs manual handling.

Closes #483.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-10 16:01:10 +02:00
Martin Afanasjew
942e1a726b tests: fuse broken/split --repository tests
The latter was replacing the former due to an identical method name.
2016-07-10 16:01:10 +02:00
Martin Afanasjew
9eed84b85c tests: remove bogus cleanup test
Test was added in 61614d35294c8faffaeb5c7f0ec6dea78dbbc30f, but never
had any effect because it was replaced by a method of the same name a
few lines further down.
2016-07-10 16:01:10 +02:00
Dominyk Tiller
288aff5365
diagnostic: adopt more certain tone
Closes #481.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-10 12:41:08 +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
832a08abcd extend/os/mac/keg_relocate: fix weird omission 2016-07-09 17:06:29 +02: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
df7e36b86c formula_cellar_checks: port to generic OS. (#452) 2016-07-09 13:51:53 +01:00
Mike McQuaid
a5ec0aa259 emoji: extract logic into generic OS classes. (#450) 2016-07-09 13:51:43 +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
Martin Afanasjew
4f2e31b3e3 language/python: fix bogus require
Including the extension is not an error, but we don't normally do this.
2016-07-09 11:58:43 +02:00
Mike McQuaid
2c792076dc cmd/install: port to generic OS. (#458) 2016-07-08 20:52:07 +01:00
Mike McQuaid
b55250c44e test_integration_cmds: use a single teardown. (#475)
Instead of writing a custom ensure for every test let's just nuke
all the files every time. This may be something we might want to use for
other unit tests too. It leans heavily on the fact that a
`FileUtils.rm_rf` on files that don't exist is very quick and things
like `brew cleanup` are super slow in comparison.

Before:
```
$ brew tests --only=integration_cmds --official-cmd-taps
Finished in 49.764724s, 1.0047 runs/s, 5.2648 assertions/s.
```

After:
```
$ brew tests --only=integration_cmds --official-cmd-taps
Finished in 43.014769s, 1.1624 runs/s, 5.8352 assertions/s.
```
2016-07-08 20:20:43 +01:00
Mike McQuaid
8282744af9 Merge pull request #471 from ilovezfs/revert-conflating-of-broken-and-undeclared
linkage: don't conflate broken and undeclared
2016-07-08 10:05:47 +01:00
Martin Afanasjew
bf40dd64df tab: eliminate redundant 'Tab.create' arguments (#468)
The `build` and `source_modified_time` arguments are always coming from
the matching attributes of the `Formula` instance. Thus query `formula`
for them instead of passing them individually.
2016-07-08 01:14:34 +02:00
ilovezfs
454645263d Revert "linkage: check undeclared dependencies for --test"
This reverts commit 080ddd8804be14f4b18f9558b58270456ff313c2.
2016-07-07 13:00:40 -07:00
ilovezfs
b35da247af Revert "linkage: update --test documentation"
This reverts commit 310d7067e01952cdcefe8b2c877bc4c792654de2.
2016-07-07 12:59:45 -07: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
Martin Afanasjew
32f7e738ec download_strategy: ensure fixed commit hash length
The length of the commit hash returned for `--short` can vary depending
on user configuration. Make sure this works independently of what might
have been configured via a user's `.gitconfig`. This also fixes the
failing `GitDownloadStrategyTests#test_last_commit` test for such users.
2016-07-07 02:14:31 +02:00
Martin Afanasjew
68bbe6ee5f Use GitRepositoryExtension for 'path' in Tap
Closes #464.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-07 01:46:58 +02:00
Martin Afanasjew
77dd9d56ff Use GitRepositoryExtension for HOMEBREW_REPOSITORY 2016-07-07 01:46:58 +02:00
Martin Afanasjew
6cdc6b1460 Add GitRepositoryExtension
Add an extension for accessing Git-related meta data that can be mixed
in into a Pathname object (e.g. `HOMBREW_REPOSITORY` or the path of a
`Tap` instance). The goal here is to eliminate code duplication.
2016-07-07 01:46:58 +02:00
Martin Afanasjew
ec75ca7e42 extend/os/mac/diagnostic: remove redundant method
Remove an exact duplicate from further up in the same file. (It was
accidentally added in 8a582f2bd976ce7044c3b2dc6eef701f94b9ace5.)
2016-07-06 16:26:27 +02:00
Martin Afanasjew
2842910609 extend/os/mac/diagnostic: fix indentation 2016-07-06 16:22:15 +02:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Mike McQuaid
11624b9a7d hardware: move generic logic from linux. (#454) 2016-07-06 10:43:54 +01:00
Mike McQuaid
416e51bca9 ENV: only check Superenv if necessary. (#451) 2016-07-06 10:43:42 +01:00
Vlad Shablinsky
45b3bfd11a
download_strategy: use short hash for git last_commit
Closes #460.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-06 16:19:49 +08:00
Vlad Shablinsky
0b2cc5c20d
test_download_strategies: add git tests 2016-07-06 16:19:49 +08:00
Vlad Shablinsky
2f5f352baa
VCSDownloadStrategy: add last_commit method
Implement:
  * VCSDownloadStrategy#last_commit
    Use last modified file timestamp
  * SubversionDownloadStrategy#last_commit
    Use `svn info --show-item revision`
  * GitDownloadStrategy#last_commit
    Use `git rev-parse HEAD`
  * MercurialDownloadStrategy#last_commit
    Use `hg parent --template {node}`
  * BazaarDownloadStrategy#last_commit
    Use `bazaar revno`
  * FossilDownloadStrategy#last_commit
  Use `fossil info tip`
2016-07-06 16:19:49 +08:00
Xu Cheng
cc01d3f59a
doctor: fix undefined method `include?' for nil:NilClass
Closes https://github.com/Homebrew/homebrew-core/issues/2758
2016-07-06 16:18:24 +08:00
Misty De Meo
ca005cb824 doctor: check for beta XQuartz releases
Beta versions of XQuartz have address sanitization enabled, which
breaks some software at runtime, including wine.

Closes Homebrew/homebrew-core#2481.

Closes #459.

Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-07-06 17:21:05 +10:00
Dominyk Tiller
1c802dd3c5
xcode: update expected clang for macOS 10.12 2016-07-06 01:14:22 +01:00
Martin Afanasjew
9e021aa661 test/lib/config: group paths by persistence
Rearrange path constants such that persistent paths (that point into the
Homebrew code base) are in one spot and all other paths (that are being
redirected to a temporary location for the duration of the test run) are
grouped together.

Closes #440.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-05 20:09:07 +02:00
Martin Afanasjew
22a47af1a2 config: document previously undocumented constants 2016-07-05 20:09:07 +02:00
Martin Afanasjew
e25b49dcb1 config: remove obsolete HOMEBREW_CONTRIB constant 2016-07-05 20:09:07 +02:00
Andrew Janke
61ffa47fd9 test-bot: fix ruby_has_encoding call regression 2016-07-05 10:50:35 -04: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
Martin Afanasjew
1b1bf56733 tests: fix leak in '[un]linkapps' integration test (#439)
Prior to the fix, every run of the test suite would leave behind a pair
of empty directories in `$TMPDIR`. (A temporary home directory was
created but only its child `Applications` was wiped when done.)
2016-07-05 14:36:02 +02:00