Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brew upgrade ignores install --ignore-dependencies option #2345

Closed
mirfilip opened this issue Mar 15, 2017 · 4 comments
Closed

Brew upgrade ignores install --ignore-dependencies option #2345

mirfilip opened this issue Mar 15, 2017 · 4 comments

Comments

@mirfilip
Copy link

The help section of brew upgrade says:

Options for the install command are also valid here.

One of the brew install options is:

If --ignore-dependencies is passed, skip installing any dependencies of
any kind. If they are not already present, the formula will probably fail
to install.

I wanted to use this option so that brew upgrade <package> doesn't install deps I skipped when originally installing the package.

This seems not to work:

$ brew upgrade --ignore-dependencies composer
==> Upgrading 1 outdated package, with result:
homebrew/php/composer 1.4.1
==> Upgrading homebrew/php/composer
==> Installing dependencies for homebrew/php/composer: php70
==> Installing homebrew/php/composer dependency: php70
==> Downloading https://homebrew.bintray.com/bottles-php/php70-7.0.15_8.sierra.bottle.tar.gz
(...)

php70 is a dependency of composer but I maintain my own php and don't want to install any other.

I'm almost sure I've done that before and it worked as expected.

HOMEBREW_VERSION: 1.1.11
ORIGIN: https://github.com/Homebrew/brew
HEAD: 394f9fa0aaa5854aa52bc589708a079665dcf462
Last commit: 9 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: acd630df256446f20819f29aec6d570f93b712c2
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.11.1 => /usr/local/bin/git
Perl: /usr/local/bin/perl => /usr/local/Cellar/perl/5.24.0_1/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /Users/me/.rbenv/shims/ruby => /Users/me/.rbenv/versions/2.3.3/bin/ruby
Java: 1.8.0_112, 1.7.0_80
macOS: 10.12.3-x86_64
Xcode: 8.2.1
CLT: 8.2.0.0.1.1480973914
X11: N/A
@MikeMcQuaid
Copy link
Member

php70 is a dependency of composer but I maintain my own php and don't want to install any other.

We don't support this use-case, I'm afraid. You'll need to consider forking the composer formula too. Similarly although this flag isn't working as expected it's a bit of a hack so fixing it for this case is low enough priority to be effectively a WONTFIX. Sorry!

@mirfilip
Copy link
Author

mirfilip commented Mar 15, 2017

Wait, but you do for brew install.

I just uninstalled composer and did brew install --ignore-dependencies composer and it installed without php70 so this is very much handled already. Do I understand you correctly that --ignore-dependencies for install is a hack or you mean --ignore-dependencies for upgrade?

If you insist it's a hack rather than a feature then - ok. At least, I would amend the upgrade docs to state so. I can do it.

EDIT: Pardon me for hijacking this with another question. If a tool is a dependency (php70 in my case), could brew omit it if which <tool> finds it in $PATH in any version?

@moll
Copy link

moll commented Apr 28, 2017

I stumbled upon the same issue. Wanted to upgrade cabal-install, but since a new patch version of GHC (v8.0.2 vs my v8.0.1) had come out. Homebrew "helpfully" forces to install GHC v8.0.2, but compiling GHC is a 4–6 hour operation on my comp and I just don't have the time right now. You can't do brew install cabal-install --ignore-dependencies either because it notices it's already installed. Having --ignore-dependencies on brew upgrade would solve this.

@ilovezfs
Copy link
Contributor

@moll

You can't do brew install cabal-install --ignore-dependencies either because it notices it's already installed. Having --ignore-dependencies on brew upgrade would solve this.

brew unlink cabal-install
brew install cabal-install --ignore-dependencies

will do what you want.

@Homebrew Homebrew locked and limited conversation to collaborators Apr 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants