Skip upgrade of pinned dependency if it's outdated#864
Skip upgrade of pinned dependency if it's outdated#864MikeMcQuaid merged 5 commits intoHomebrew:masterfrom
Conversation
Ideally yes. Add it to
I think if it's pinned we should probably just refuse to do anything with it (reinstall or upgrade) and require the user to manually uninstall/unpin/upgrade to resolve it. |
Library/Homebrew/dependency.rb
Outdated
There was a problem hiding this comment.
This is a bit different to what I think we want. Instead of considering this satisfied it should be considered unsatisfied, refuse to upgrade and print out a message telling the user to unpin.
There was a problem hiding this comment.
Ah, I see, will change it this way, then and ask for the comments later.
cd985ba to
682e902
Compare
|
@MikeMcQuaid how does the current implementation look? |
There was a problem hiding this comment.
TODO: remove.
682e902 to
684b28d
Compare
Library/Homebrew/cmd/reinstall.rb
Outdated
There was a problem hiding this comment.
I wonder if it's worth making this an onoe and using next so it'll print a warning for all of them rather than just the first?
|
A few small comments but I like the approach 👍 |
684b28d to
3a81c9d
Compare
Prompt user to unpin pinned dependencies of the formula
Forbid to install formual if it has pinned dependencies.
3a81c9d to
846fa23
Compare
|
Changed the logic a bit, as we don't need to fail if dependency is |
|
We don't? Since most things go through |
|
@ilovezfs if a pinned dependency is satisfied doesn't it mean that if we unpin it then it won't be reinstalled anyway? https://github.com/Homebrew/brew/blob/master/Library/Homebrew/formula_installer.rb#L385-L386 |
|
Thanks again @vladshablinsky! |
brew testswith your changes locally?Description:
A fix for #831 was introduced in #846 but the behaviour of install process should have been reconsidered anyway. This PR implements the ideas being discussed in #846.
Idea: Don't upgrade dependency of formula if this dependency is pinned while installing the formula.
TODO?
I'm not sure about two things here:
test_integration_cmds,test_formula_installerortest_dependency?repinformulaBif it's pinned and installation ofAthat depends onBrequires different options from ones being used in pinned keg ofB, so we eventually upgrade/reinstallB, but don't repin it.CC @MikeMcQuaid @ilovezfs