13469 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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. 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
Mike McQuaid
36dadbee47 caveats: remove python caveats.
These instructions are currently incorrect and need to be ported to
`python` 3.x and `python@2` formulae. Until then it's better to not have
them than have them be incorrect.

Closes #3890.
2018-03-08 08:34:20 +00:00
Mike McQuaid
8860402f8f
utils: only try and replace tap or replaced methods. 2018-03-08 08:22:47 +00:00
Mike McQuaid
53a71a79b3
Merge pull request #3875 from MikeMcQuaid/test-deps
Allow :test dependencies.
2018-03-08 08:19:15 +00:00
Mike McQuaid
8e928992f5
keg: tweak delete_pyc_files! 2018-03-08 08:17:57 +00:00
ilovezfs
f87a589129 keg: don't delete main opt links of other formulae.
If an old alias, according to the tab, of a formula being upgraded (e.g.
python) has the same name as the main opt link of some other formula
(e.g. python@2), don't remove the main opt link of that other formula.

Specifically,

  brew install python@2
  brew upgrade python

should not accidentally delete /usr/local/opt/python@2 even though
python@2 used to be an alias of python.
2018-03-07 22:35:23 -08:00
Chongyu Zhu
3db033ca89
keg: delete_pyc_files! should also remove __pycache__ 2018-03-08 13:02:03 +08:00
Mike McQuaid
eee6e98d90
Merge pull request #3840 from aw1621107/prefer-xcode-libcxx
Add macOS libs ahead of brewed llvm libs in lib search path
2018-03-07 16:03:26 +00:00
Mike McQuaid
740e89d2f3
super: tweak LLVM refactoring. 2018-03-07 15:00:08 +00:00
Vítor Galvão
6c203f9372
Merge pull request #3865 from commitay/systemcommand
Fix SystemCommand escaping
2018-03-06 09:34:56 +00:00
Mike McQuaid
7cb6ebf3fb
super: refactor LLVM path addition. 2018-03-06 08:44:47 +00:00
Mike McQuaid
067b9c9e88
Merge pull request #3833 from GauthamGoli/depends_on_order_master
rubocop: Add cop to check `depends_on` order and tests
2018-03-06 08:35:10 +00:00
Mike McQuaid
ba4ac75543
Merge pull request #3836 from alyssais/info_sort
info: sort HEAD keys by install date
2018-03-06 08:35:00 +00:00
Mike McQuaid
dedda60bdd
Merge pull request #3879 from sjackman/unzip_dep_if_needed
unzip_dep_if_needed: Needs unzip not zip [Linux] (#632)
2018-03-06 08:34:48 +00:00
Nikoli Dryden
11817fe1f7
Generalize the regex determining the Xcode version.
The current regex only matches a single digit for each component of the version (e.g. 9.2). This modifies it to match multiple digits in each component, so that e.g. 10.42 will be matched.
2018-03-05 19:44:11 -06:00
Shaun Jackman
5500c3b25e unzip_dep_if_needed: Needs unzip not zip [Linux] (#632) 2018-03-05 11:51:08 -08:00
Shaun Jackman
4af8950f8b check_undeclared_deps: Fix for taps
undeclared_deps reported all dependencies in taps as undeclared.
2018-03-05 09:51:27 -08:00
Mike McQuaid
fea9bc1e42 Allow :test dependencies.
These specify that they are needed by the test block. This can be
combined with `:build` to ensure that this formula isn't uninstalled
by `brew test-bot` when running `test do` blocks on our CI.
2018-03-05 10:36:39 +00:00
Mike McQuaid
3184d087b9
Merge pull request #3867 from MikeMcQuaid/migrator-messaging-tweaks
migrator: tweak more messaging.
2018-03-05 10:26:37 +00:00
Mike McQuaid
1a51d7fb44 migrator: tweak more messaging.
- Make it clearer what the migrator is doing and why
- Recommend an unconditional brew upgrade
2018-03-05 10:14:39 +00:00
Teddy Wing
ee004cb9c7 cmd/upgrade: Change build.build_bottle? to build.bottle?
I received the following error when attempting to use the `upgrade`
command on a tap:

    $ brew tap teddywing/passextract https://github.com/teddywing/Passextract.git
    $ brew upgrade --verbose teddywing/passextract/passextract
    Updating Homebrew...

    ==> Upgrading 1 outdated package, with result:
    teddywing/passextract/passextract 0.4.0
    Error: Calling build.build_bottle? is disabled!
    Use build.bottle? instead.
    /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:121:in `upgrade_formula'
    Or, even better, submit a PR to fix it!

Change the method call to use the (presumably) newer version.
2018-03-04 12:38:33 +01:00
Mike McQuaid
bc3389bdae
Merge pull request #3863 from MikeMcQuaid/python3-changes
Adjust docs and more internal code for Python 3.
2018-03-03 18:17:04 +00:00
Mike McQuaid
83fae62b4f Gemfile.lock: update testing gems. 2018-03-03 10:22:37 +00:00
Mike McQuaid
8d6aa70f9c
Merge pull request #3861 from scpeters/patch-3
language/python: version 3.6 in site_packages
2018-03-03 09:43:41 +00:00