9340 Commits

Author SHA1 Message Date
Yoshimasa Niwa
d51cd15e0c Create caskroom without sudo in writable parent.
In case the parent directory of Caskroom is writable for the user, we
don't need to use `sudo` to execute commands.

Make a generic method to run commands that has an option to switch sudo
so that we can run commands with and without sudo.
2016-10-10 11:17:07 -07:00
Mike McQuaid
bb96fd7c42 Merge pull request #1255 from akirk/patch-1
brew.sh: allow --prefix to be run as root without warning
2016-10-10 16:56:49 +01:00
Alyssa Ross
6c5b8f0f5e Update URL in qualified_token comment
The homebrew/homebrew wiki no longer exists.
2016-10-10 14:46:00 +01:00
Alex Kirk
7502c85698 Don't display root warning for --prefix 2016-10-10 14:25:07 +02:00
Yoshimasa Niwa
d00f35b8c4 FIX: cask changes /usr/local ownership recursively
Relatively old code in Hbc::Caskroom recursively changes the ownership
of the directory where the Caskroom directory exists, that changes
entire files in /usr/local to user:staff if Homebrew setup with default
configuration.
This is really dangerous because it's easy to trigger (just simply type
`brew cask something` by following some installation documentation.)

This patch removes entire `chown` with -R option and make the logic
simply creating Caskroom directory with default Homebrew directories
ownership and permission.
2016-10-09 13:27:31 -07:00
Mike McQuaid
0546d90e3d Merge pull request #1251 from MikeMcQuaid/diagnostic-no-write-tmp
diagnostic: handle HOMEBREW_TEMP mktmpdir failure.
2016-10-09 15:26:31 +01:00
Markus Reiter
8ded5b690f No need to check if Encoding is defined. 2016-10-09 15:34:12 +02:00
Markus Reiter
67a7d1a64a Fix getting cask path for queries. 2016-10-09 15:34:12 +02:00
Mike McQuaid
21ff82be7f diagnostic: handle HOMEBREW_TEMP mktmpdir failure.
Fixes #1223.
2016-10-09 14:33:04 +01:00
Mike McQuaid
0c193c308e Merge pull request #1241 from reitermarkus/deprecation-warning
Comment out `license` stanza deprecation warning.
2016-10-09 14:24:55 +01:00
ilovezfs
5efb158860 cleanup: remove GLIDE_HOME cache directories
This is needed since some formulae now set

  ENV["GLIDE_HOME"] = HOMEBREW_CACHE/"glide_home/#{name}"
2016-10-08 10:05:04 -07:00
Mike McQuaid
1b677ab0ff Merge pull request #1238 from MikeMcQuaid/user-agent-version
brew.sh: improve user agent with no git repo.
2016-10-08 16:40:56 +01:00
Markus Reiter
c78d1e6bb5 Merge pull request #1243 from reitermarkus/rename-deprecation-exception
Rename FormulaMethodDeprecatedError to  MethodDeprecatedError.
2016-10-08 17:16:29 +02:00
Markus Reiter
b306f14b97 Rename FormulaMethodDeprecatedError to MethodDeprecatedError. 2016-10-08 13:26:10 +02:00
Markus Reiter
5cae4532bf Remove Homebrew Cask documentation. 2016-10-08 12:10:54 +02:00
Markus Reiter
624a6d0822 Comment out license stanza deprecation warning. 2016-10-08 12:07:12 +02:00
Markus Reiter
fca66e17b3 Make parsing locales more robust. 2016-10-07 20:03:50 +02:00
Mike McQuaid
8e231d8ef5 brew.sh: improve user agent with no git repo.
`Homebrew/>1.0.0 (no git repository) (Macintosh; Intel macOS 10.7.5)...)
reads pretty weirdly in a user agent and I've had complaints that `>`
may be an invalid character in some cases.
2016-10-07 18:02:38 +01:00
Mike McQuaid
7af8cdcb04 Merge pull request #1228 from jonchang/audit
audit: forbid `deprecated_option` in new formulae
2016-10-07 17:08:11 +01:00
Markus Reiter
415e5f1f78 Merge pull request #1235 from abookyun/deprecate-license
Deprecate license
2016-10-07 17:59:37 +02:00
Markus Reiter
e1ec23eea0 Merge pull request #1220 from reitermarkus/tap-version-string
Make `core_tap_version_string` reusable.
2016-10-07 17:59:06 +02:00
David Yun
ca68085e59 Fix unused argument 2016-10-07 23:12:30 +08:00
David Yun
2e9ec473e9 Fix HOMEBREW_PREFIX/Caskroom file leak 2016-10-07 17:09:24 +08:00
David Yun
81082303dc Use odeprecated rather than remove it entirely
* Fix IntegrationCommandTestCask
2016-10-07 10:27:21 +08:00
Markus Reiter
9c2420a9ef “Homebrew Cask” -> “Homebrew-Cask” 2016-10-06 18:34:20 +02:00
David Yun
d4927815a5 Remove license from all documentation 2016-10-07 00:21:25 +08:00
David Yun
5fead8eb5e Deprecate license stanza 2016-10-06 23:25:42 +08:00
Markus Reiter
faebc64815 Merge pull request #1216 from reitermarkus/fix-language-audit
Fix exit code for multilingual cask audit.
2016-10-06 15:51:30 +02:00
Markus Reiter
7e70ebd4f1 Merge pull request #1207 from reitermarkus/cask-already-installed-warning
Change `A Cask for #{token} is already installed.` message.
2016-10-06 12:56:39 +02:00
Markus Reiter
6f070641b9 Merge pull request #1196 from reitermarkus/dmg-metadata
Add `.com.apple.timemachine.supported` to DMG_METADATA_FILES.
2016-10-06 11:57:46 +02:00
Jonathan Chang
5b360c57e3 audit: forbid deprecated_option in new formulae 2016-10-05 15:59:16 -07:00
Tim D. Smith
47d57ca995 Immortalize virtualenvs better
virtualenvs remember the prefix of the python that created them and do
magic to load packages from them; help them remember a more durable
path.
2016-10-04 22:57:08 -07:00
Dominyk Tiller
fcc9cfa6ae
apr_requirement: favour system as much as possible 2016-10-05 01:45:24 +01:00
Dominyk Tiller
b6ecaa26f5
apr_requirement: fix always marked as missing req on Sierra 2016-10-04 23:24:32 +01:00
Dominyk Tiller
0756a3d7d8
apr_requirement: require Homebrew's Apr on Sierra
Sierra ships the headers/libraries still but for some reason decided to bin
the config scripts, which whilst seemingly not an issue for `mesos`
or `ganglia` it has broken `subversion`, `log4cxx`, `ctail`, `shibboleth`
and `passenger` that we know of so far. Let's assume more often than not
things are going to break without those config scripts around.
2016-10-04 23:16:31 +01:00
Markus Reiter
ddf5583208 Refactor Cask’s extensions. 2016-10-04 15:43:58 +02:00
Markus Reiter
23dec587fd Make core_tap_version_string reusable. 2016-10-04 14:45:11 +02:00
Markus Reiter
cafe149780 Merge pull request #1145 from reitermarkus/module-function
Use `module_function` for `Homebrew` module.
2016-10-04 10:31:49 +02:00
Mike McQuaid
881fdcd25e Merge pull request #1190 from vladshablinsky/no-autoupdate-on-help
brew.sh: don't autoupdate if --help passed
2016-10-03 18:38:46 +01:00
Mike McQuaid
ea5aff8d7c Merge pull request #1193 from MatzFan/fix_verbose_tests
fix tests failing when verbose set
2016-10-03 16:50:24 +01:00
Bruce Steedman
c9733ba33e revert changes 2016-10-03 14:28:25 +01:00
Markus Reiter
108d0761ee Fix exit code for multilingual cask audit. 2016-10-03 10:23:30 +02:00
Mike McQuaid
1e1903e4cc Merge pull request #636 from ilovezfs/spooky_python
virtualenv_install_with_resources: select correct python
2016-10-03 08:10:12 +01:00
ilovezfs
23a38e0ff6 virtualenv_install_with_resources: select correct python
`virtualenv_install_with_resources` will now attempt to guess the
desired Python based on the active build options and based on the
dependencies and requirements. When the situation is ambiguous (e.g.,
`depends_on :python3` and `build.with? "python"` is true) raise
`FormulaAmbiguousPythonError` unless `:using => "python"` or
`:using => "python3"` has been passed to resolve the ambiguity.

In most cases, this will allow

```
    virtualenv_create(libexec, "python3")
    virtualenv_install_with_resources
```

to be changed to just

```
    virtualenv_install_with_resources
```
2016-10-02 18:08:56 -07:00
Markus Reiter
e2b3753fd9 Style changes in language_eval. 2016-10-03 02:57:29 +02:00
Markus Reiter
ef26bf1882 Refactor audit for changed DSL. 2016-10-03 02:34:53 +02:00
Markus Reiter
b104e6ff37 Raise error if more than one default language if specified. 2016-10-03 02:34:53 +02:00
Markus Reiter
013f33be44 Change language DSL to only allow strings. 2016-10-03 02:34:53 +02:00
Markus Reiter
b5531e8ec1 Add Locale class to enable easier matching of locales. 2016-10-03 02:34:53 +02:00
Markus Reiter
bc143bb470 Support audit for multilingual casks. 2016-10-03 02:34:53 +02:00