15907 Commits

Author SHA1 Message Date
Markus Reiter
2876aad217 Fix MethodDeprecatedError output. 2018-03-21 05:42:23 +01:00
commitay
540f1545c3
Merge pull request #3886 from commitay/java-10
java_requirement, cask dsl caveats: java 10
2018-03-21 09:00:24 +10:00
Maxim Belkin
0513d9de5c
display_items: handle nil keys 2018-03-20 12:30:14 -05:00
Maxim Belkin
81042c63fb
dylib_to_dep: use Regexp 2018-03-20 10:06:52 -05:00
Markus Reiter
3cd5ae860f
Merge pull request #3821 from rednoah/master
Fix broken support GPG containers with embedded signatures
2018-03-20 16:00:29 +01:00
Mike McQuaid
058dad61b1
Merge pull request #3948 from MikeMcQuaid/audit-run
Audit use of :run dependencies.
1.5.11
2018-03-19 10:36:48 +00:00
Mike McQuaid
d2c23bde6d Audit use of :run dependencies.
These are a no-op so let's remove them.
2018-03-19 10:11:08 +00:00
Mike McQuaid
08db242ccd
Merge pull request #3944 from bukzor/command-not-which
/usr/bin/which -> type -P
2018-03-19 08:52:21 +00:00
Reinhard Pointner
90a75119ca e.g.
url "https://get.filebot.net/filebot/latest/FileBot_#{version}-darwin.tar.xz.gpg"
gpg :embedded, key_url: 'https://raw.githubusercontent.com/filebot/plugins/master/gpg/maintainer.pub'
2018-03-19 14:35:49 +07:00
Maxim Belkin
1501354ee7 Fix brew style error and warning 2018-03-18 19:03:31 -05:00
Maxim Belkin
9642485e73 Missing libraries now report corresponding missing formulae 2018-03-18 18:52:12 -05:00
Buck Evan
0a2e649f00 type -P is more portable than which
Migrated from https://github.com/Linuxbrew/brew/pull/621
2018-03-18 16:51:22 -07:00
Maxim Belkin
8634f19107 linkage: consider missing links to Cellar 2018-03-18 17:40:52 -05:00
Buck Evan
a2646a8694 fix: crash when curl is not installed 2018-03-18 14:09:23 -07:00
ilovezfs
efe07f4a43
Merge pull request #3946 from MikeMcQuaid/keg-delete-pycache-dir
keg: delete __pycache__ directory.
2018-03-18 12:12:01 -07:00
Mike McQuaid
9c8adb4ac0 keg: delete __pycache__ directory. 2018-03-18 18:48:43 +00:00
Mike McQuaid
bbbd6d86b8
Merge pull request #3942 from bukzor/bin-cat
/bin/cat -> cat
2018-03-18 08:53:20 +00:00
Buck Evan
c1403ba933 /bin/cat -> cat
this allows odd linux installations (Android) to function
2018-03-17 17:05:39 -07:00
Mike McQuaid
63e8817950
Merge pull request #3937 from MikeMcQuaid/upgrade-pinned-warning
upgrade: make pinned error have correct exit code.
2018-03-17 17:40:10 +00:00
Maxim Belkin
2a6a2b2fa0 Fixes for linkage_checker
1. In "display_test_output": when printing dependencies without
linkage, use "Dependencies with no linkage" string instead of "Possible
unnecessary dependencies" for consistency with "display_normal_output"

2. In "check_dylibs": keep track of and skip repetitive checking of
those dylibs that have been previously checked. This is applicable when
different executables/libraries are linked against the same libraries.

3. In "check_undeclared_deps": when there are missing libraries,
corresponding dependencies should be excluded from the list of
dependencies with no linkage.
2018-03-17 00:49:04 -05:00
Mike McQuaid
e8a4aad56c
Merge pull request #3939 from MikeMcQuaid/linuxbrew-core-not-yet
Don't use Linuxbrew/homebrew-core (yet, at least).
2018-03-16 20:31:35 +00:00
Mike McQuaid
96ff688b9d upgrade: make pinned error have correct exit code.
Also, display before saying "no packages to upgrade".

Fixes #3936.
2018-03-16 20:31:20 +00:00
Mike McQuaid
70a9a67411 Don't use Linuxbrew/homebrew-core (yet, at least).
This can't be tapped on vanilla Homebrew/brew because things like e.g.
`GlibcRequirement` are missing. We will put this back when the Linuxbrew
to Homebrew migration is complete.
2018-03-16 19:30:18 +00:00
Mike McQuaid
6c7e8608be
Merge pull request #3924 from MikeMcQuaid/include-test
install: add --include-test option.
2018-03-16 14:21:17 +00:00
Mike McQuaid
057d3461a9
Merge pull request #3932 from MikeMcQuaid/external-commands-docs
Improve external command documentation
2018-03-16 14:21:06 +00:00
Mike McQuaid
13bb2be21f
Merge pull request #3914 from MikeMcQuaid/prune-recursive-test
deps: don't display recursive test dependencies.
2018-03-16 14:20:47 +00:00
Mike McQuaid
e50c40b9c6 uses: add --include-test support. 2018-03-16 09:29:31 +00:00
Mike McQuaid
b23f66982f Improve external command documentation
Extract `brew bundle` and `brew services` docs from their help. Add a
little for `brew cask` until we can think about e.g. merging the
manpages.
2018-03-15 16:25:14 +00:00
Mike McQuaid
82e82b7fbc install: add --include-test option.
Allow at `install` (or `install --only-dependencies`) time to specify
that test dependencies should be installed. This will allow simplifying
code in `brew test-bot`.

This could also be made an environment variable if desired by
maintainers.
2018-03-15 13:37:34 +00:00
Mike McQuaid
cb6828dbe6
Merge pull request #3925 from maxim-belkin/git_remote_exists_bool
append ? to git_remote_exists
2018-03-15 08:20:14 +00:00
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