15827 Commits

Author SHA1 Message Date
Mike McQuaid
cfe3e253f5
Merge pull request #3926 from maxim-belkin/svn_remote_exists_bool
add ? to svn_remote_exists
2018-03-15 08:06:16 +00:00
Maxim Belkin
c99cfd1591
add ? to svn_remote_exist 2018-03-14 16:55:45 -05:00
Maxim Belkin
f984701c29
append ? to git_remote_exist 2018-03-14 16:30:45 -05:00
AndrewMcBurney
bc76a8afcb Changed default behavior of brew linkage command to build cache instead of using cached output. Cached output may be printed with --cached flag. 2018-03-14 16:36:56 -04:00
Markus Reiter
96fd1a8c2a
Merge pull request #3923 from reitermarkus/rubocop-cask
Update `rubocop-cask` to 0.17.3.
2018-03-14 19:14:27 +01:00
Markus Reiter
d343c28b37 Update rubocop-cask to 0.17.3. 2018-03-14 18:18:23 +01:00
Mike McQuaid
1dfeff7274 deps: don't display recursive test dependencies.
You only care about the test dependencies for the specific formula you
are testing right now.
2018-03-14 15:41:20 +00:00
Mike McQuaid
c933247a77
Merge pull request #3921 from xu-cheng/cleanup-nfs
cleanup: fix removing lock files on NFS
2018-03-14 14:05:41 +00:00
Xu Cheng
d3fce64efb
cleanup: fix removing lock files on NFS
If the underneath file system is a Network File System,
`brew cleanup` will fail to remove the lock files with following error
message:

Error: Bad file descriptor @ rb_file_flock - /path/to/the/lock_file

This commit fixes such issue and adds the corresponding test case.
2018-03-14 21:50:53 +08:00
Mike McQuaid
c8533db23f
Merge pull request #3915 from MikeMcQuaid/only-dependencies-fill-in
install: make --only-dependencies fill in missing.
2018-03-14 09:23:28 +00:00
Claudia
656986153b Stop file ext detection at query param boundaries
This commit improves Homebrew’s extension detector in `cask/lib/hbc/download_strategy.rb` a bit
so that it won’t cross individual URL query param boundaries any
longer:

```
def ext
  Pathname.new(@url).extname[/[^?&]+/]
end
```
2018-03-13 16:58:52 +01:00
Claudia
ba830df4e6 Add tests for CurlDownloadStrategy#tarball_path
Sometimes, `brew cask fetch`/`install` fails with an error message
similar to this:

```
==> Downloading https://w3g3a5v6.ssl.hwcdn.net/upload2/game/214692/735
Error: Download failed on Cask 'steamed-hams' with message: Operation
not supported @ rb_sysopen -
/Users/claudia/Documents/dev/brew/var/homebrew/locks/steamed-hams--1.0
.com&Expires=1520937180&Signature=CGmDulxL8pmutKTlCleNTUY%2FyO9Xyl5u9y
VZUE0uWrjadjuz67Jp7zx3H7NEOhSyOhu8nzicEHRBjr3uSoOJzwkLC8LBLKnz%2B2X%2B
iq5m6IdwSVFcLp2Q1Hr2kR7ETn3rF1DIq5o0lHCyzMmyNe5giEKJNW8WF0KXriULhzLTWL
SA3ZTLCIofAdRiiGje1kNYY3C0SBqymQB8CG3ONn5kj7CIGbxrDOq5xI2ZSJdIyPysSX7S
LvEDBw2KdR24q9t1wfjS9LUzelf5TWk6ojj8p9%2FHjl%2Fi%2FVCXNN4o1mW%2FMayy2t
TY1qcC%2FTmqI1ulZS8SNuaSgr9Iys9oDF1%2BPK%2B4Sg==&hwexp=1520937440&hwsi
g=55bc66884b925ef22f8673c33bfcc33b.incomplete.lock
```

To reproduce the issue, check out this branch and run the
`cask/download_strategy` test suite:

```
brew tests --only=cask/download_strategy
```

Or take a real-life example, which would be a Cask whose URL has
**1.** no `.` character anywhere in the URL path itself (outside of
the domain name), **and 2.** at least one query parameter with a `.`
character in it; **and 3.** other query parameters following that
with a combined length of more than 255 characters.

This combination may be uncommon but it exists, especially in
[URLs that change on every visit](1002d41242/doc/cask_language_reference/stanzas/url.md (urls-that-change-on-every-visit)),
for example
[`steamed-hams`](9d7df499cd/Casks/steamed-hams.rb)
from my `claui/cask-games` tap:

    $ brew tap claui/cask-games

    $ brew cask fetch steamed-hams

In a nutshell, **URL query strings sometimes look like a very long
file extension to Homebrew,** which it then proceeds to use as a file
name.

In `CurlDownloadStrategy`, Homebrew seems to apply a heuristic to the
cask URL in order to figure out a possibly meaningful file extension.
Sometimes this heuristic produces immensely long file extensions,
especially when there’s a query parameter with a `.` character in it
but not in the URL path itself (outside of the domain name).

Homebrew then believes that everything after the `.` is a file
extension. In one of the later steps, it tries to create a lock file
containing that extension, which fails because HFS+ cannot handle
files whose base file name has more than 255 characters.

One solution would be to improve Homebrew’s extension detector a bit
so that it won’t cross individual URL query param boundaries any
longer. This is done by adding `&` as a stop character:

```
def ext
  Pathname.new(@url).extname[/[^?&]+/]
end
```

This appears to fix the issue for most (if not all) practical
purposes.
2018-03-13 16:58:52 +01:00
Mike McQuaid
86a6361f4e install: make --only-dependencies fill in missing.
This makes the `brew install --only-dependencies` command more useful by
filling in missing dependencies for a formula even if it's already
installed.
2018-03-13 09:43:29 +00:00
Mike McQuaid
d5799a5a68
Merge pull request #3911 from stek29/misfeature
build: do not skip runtime deps of buildtime deps
2018-03-13 09:03:23 +00:00
Viktor Oreshkin
2e33541278 build: do not skip runtime deps of buildtime deps
Fix #3883
Revert 2fb5ead38a7632ff6f941909474767883a9e0252
2018-03-12 22:36:47 +03:00
Mike McQuaid
144356e238
Merge pull request #3912 from stek29/git-log-format
utils/git: use exact format for last_revision_*
2018-03-12 11:39:39 +00:00
Mike McQuaid
92d6437d0d
Merge pull request #3913 from MikeMcQuaid/upgrade-cleanup-env
upgrade: add HOMEBREW_UPGRADE_CLEANUP variable.
2018-03-12 11:39:00 +00:00
Viktor Oreshkin
461bb20b7c utils/git: use exact format for last_revision_*
Format for oneline can be overridden in user's gitconfig. If that's the
case, last_revision_commit_of_file won't work properly, and because of
that last_revision_of_file won't work at all.

Here's what I was getting when running brew tests:

       expected: "6bec2de"
            got: "\e[33m6bec2dee633f\e[m"

I have abbrev length set to 12, and oneline formatting is more colorful.

So, instead of relying on overrideable format, it should rather specify
"--format=%h" to get only hash, and speciy --abbrev=7 to force abbrev
length to be 7

After this commit tests are passing for me.
2018-03-12 14:07:00 +03:00
Mike McQuaid
e817bba18d upgrade: add HOMEBREW_UPGRADE_CLEANUP variable.
Allow users to specify they want `brew upgrade --cleanup` to always be
run when they run `brew upgrade`.
2018-03-12 11:05:06 +00:00
Mike McQuaid
700a4b4ca7
Merge pull request #3910 from alyssais/create_style
Fix style in `brew create`-generated formulae
2018-03-12 09:33:21 +00:00
Alyssa Ross
6cd195723f
Merge branch 'master' into undeclared_runtime_dependencies 2018-03-12 09:22:39 +00:00
Alyssa Ross
0a2f0ab456
Fix formula/linkage_checker infinite recursion 2018-03-12 09:20:24 +00:00
Alyssa Ross
69b9c11ae8
Fix style in brew create-generated formulae
- Fix indentation oddities
- Add empty lines where we expect them in submitted formulae
2018-03-12 09:04:07 +00:00
Mike McQuaid
254ce8bb64
Merge pull request #3909 from MikeMcQuaid/utils-tap-message
utils: check for tap_message in odeprecated.
2018-03-11 18:00:10 +00:00
Mike McQuaid
5e161252c9 utils: check for tap_message in odeprecated.
`tap` is not a method-wide variable.

Fixes #3907
2018-03-11 16:55:06 +00:00
Mike McQuaid
962459a3cc
Merge pull request #3905 from SaberUK/man-update-correction
upgrade: fix the man page wrongly saying that it will upgrade pins.
2018-03-10 13:22:17 +00:00
Peter Powell
e71b2d1737 upgrade: fix the man page wrongly saying that it will upgrade pins.
This is incorrect as in order to upgrade a pinned package it must
first be unpinned.
2018-03-10 12:07:13 +00:00
Mike McQuaid
04efbadb9e
Merge pull request #3902 from MikeMcQuaid/python-binaries
Homebrew-and-Python: update binary locations.
1.5.10
2018-03-10 10:32:42 +00:00
Mike McQuaid
371dd7feec Homebrew-and-Python: update binary locations.
Updated to comply with PEP 394:
https://www.python.org/dev/peps/pep-0394/
2018-03-10 10:31:39 +00:00
ilovezfs
06339ee007
Merge pull request #3903 from ilovezfs/python-virtualenv-invoke-python-with-versioned-name
virtualenv_install_with_resources: invoke python with versioned name.
2018-03-09 14:54:42 -08:00
ilovezfs
776fec7f6b virtualenv_install_with_resources: invoke python with versioned name.
The unversioned python executable no longer refers to python3.
2018-03-09 14:01:52 -08:00
Mike McQuaid
8d22cb7a7c
Merge pull request #3899 from MikeMcQuaid/diagnostic-remove-python-pth
diagnostic: remove python pth check.
2018-03-09 15:06:59 +00:00
Mike McQuaid
bdb86640e9 diagnostic: remove python pth check.
This isn't an issue with Homebrew but an issue for users to configure
themselves. It's also nonsensical with current Python configurations
e.g. https://discourse.brew.sh/t/brew-doctor-warnings-about-python-3-6-site-packages-and-sitecustomize/1805/1
2018-03-09 14:54:52 +00:00
Gautham Goli
5743f22209 cli : Implement Parser and use it for parsing audit command args 2018-03-09 02:44:50 +05:30
ilovezfs
df1fb59d4d
Merge pull request #3895 from ilovezfs/python-expect-python@2-in-Cellar-path
language/python: expect @ in python@2 Cellar paths
2018-03-08 08:54:08 -08:00
ilovezfs
34bd99af8d language/python: expect @ in python@2 Cellar paths
The realpath of the python@2 Cellar contains "python@2" not "python2" so
check for "python@2" when doing Cellar->opt robustifications.
2018-03-08 08:10:48 -08:00
Mike McQuaid
74443999f4
Merge pull request #3876 from MikeMcQuaid/homebrew-rubocop-upgrade
RuboCop 0.53.0
2018-03-08 14:40:13 +00:00
Mike McQuaid
83cca40fc9 RuboCop 0.53.0 manual fixes. 2018-03-08 14:10:02 +00:00
Mike McQuaid
e03f07f302 Rubocop 0.53.0 automatic fixes. 2018-03-08 14:10:02 +00:00
Mike McQuaid
718a2112d7 rubocop.yml: adjust rules for 0.53.0. 2018-03-08 14:10:02 +00:00
Mike McQuaid
b165f5427f RuboCop 0.53.0 2018-03-08 14:10:02 +00:00
Mike McQuaid
924c4af3de dep*: fix more :test dependency resolution. 1.5.9 2018-03-08 09:46:53 +00:00
Mike McQuaid
6788e78c03 Revert "keg: tweak delete_pyc_files!"
This reverts commit 8e928992f5d2a1bbc39b295e2d2a9a2565ecec2a.
2018-03-08 09:18:52 +00:00
Mike McQuaid
e906ec374b Revert "keg: fix delete_pyc_files path typo."
This reverts commit 948b1b8dbeb7bce35d5b0ecc45b14ac50d4eee93.
2018-03-08 09:18:49 +00:00
Mike McQuaid
1d708d77cb
Merge pull request #3892 from lembacon/pycache
keg: `delete_pyc_files!` should also remove `__pycache__`
2018-03-08 09:02:09 +00:00
Mike McQuaid
42fc339ee6 test: correctly prune non-test dependencies. 2018-03-08 08:56:58 +00:00
Mike McQuaid
5ec8947a0f
Merge pull request #3858 from DomT4/stop_suggesting_fixing_death
utils: stop suggesting fixing hard deprecations
2018-03-08 08:50:29 +00:00
Mike McQuaid
86af49d247
Merge pull request #3894 from MikeMcQuaid/remove-python-caveats
caveats: remove python caveats.
2018-03-08 08:50:16 +00:00
Mike McQuaid
948b1b8dbe
keg: fix delete_pyc_files path typo. 2018-03-08 08:37:34 +00:00
Mike McQuaid
d32fc4508f deps: fix test? typo. 2018-03-08 08:36:01 +00:00