This repository has been archived by the owner. It is now read-only.

handle conditional deps when doing brew upgrade #11179

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

camillol commented Mar 24, 2012

Many formulas add dependencies conditionally based on the presence
of some options in ARGV. These options are saved in the tab file,
but they are not present in ARGV when brew upgrade is called. As a
result, upgraded formulas are installed with the wrong dependencies.
This patch solves the problem by letting formulas see the expected
ARGV while upgrading. In the long term, it would be better to
remove all uses of ARGV from formulas in favor of some options-based
interface, but this bug does not have to wait until a new design is
finalized.

Fixes #11171

handle conditional deps when doing brew upgrade
Many formulas add dependencies conditionally based on the presence
of some options in ARGV. These options are saved in the tab file,
but they are not present in ARGV when brew upgrade is called. As a
result, upgraded formulas are installed with the wrong dependencies.
This patch solves the problem by letting formulas see the expected
ARGV while upgrading. In the long term, it would be better to
remove all uses of ARGV from formulas in favor of some options-based
interface, but this bug does not have to wait until a new design is
finalized.

Fixes #11171
Contributor

jacknagel commented Mar 26, 2012

Haven't had a chance to apply and test this, but it seems reasonable for a short-term fix.

I agree that formulae need to stop using ARGV. Adam has done some work on this in his options branch but I don't know if it goes far enough to fix the conditional dep problem. To really solve this I think we're going to need a FormulaFactory that can be instructed to use the install receipt when loading formulae by commands that need it.

Contributor

adamv commented Aug 9, 2012

This should be addressed in a more stable way by the work in #13923.

@adamv adamv closed this Aug 9, 2012

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.