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

Full path to tapped dependency installs wrong version #16375

Closed
staticfloat opened this Issue Dec 3, 2012 · 15 comments

Comments

Projects
None yet
3 participants
Contributor

staticfloat commented Dec 3, 2012

I'm running into a conflict between formulae with the same name in my tap, and in homebrew/science and mainline.

Toward the end of this issue, you will see that despite my julia formula depending on staticfloat/julia/openblas, the openblas from homebrew/science is getting installed.

Contributor

samueljohn commented Dec 3, 2012

@staticfloat is right and in the last few weeks this must have changed, because it worked before. Not sure which change is the cause though

Contributor

samueljohn commented Dec 4, 2012

This issue is a blocker for some third-party taps such as julia.

Contributor

staticfloat commented Dec 21, 2012

Just wanted to ping you all on this again, as it really is a problem for people wanting to install Julia. I can look into a fix on this if you can give me a starting place to look.

Contributor

samueljohn commented Dec 21, 2012

@jacknagel said, he is going to fix some things these days. Jack, if you are not about to tackle this, I could make a PR but I don't want to waste work on this if the depdens_on/requirements/options code is being reworked.

Contributor

staticfloat commented Jan 13, 2013

This is still causing users of my tap to have compilation problems, as mxcl/suite-sparse is getting installed instead of staticfloat/julia/suite-sparse.

Contributor

samueljohn commented Jan 13, 2013

@staticfloat how should this behave if I already have a brewed suite-sparse? Should it deinstall the other one?

Can we perhaps make the deps you need more appropriate to your needs.

Contributor

staticfloat commented Jan 13, 2013

Ideally, we would have options that we can require of the dependent suite-sparse formula. E.g. the only difference between staticfloat/julia/suite-sparse and mxcl/suite-sparse is the former adds TBB as an option, not included by default, and it uses OpenBLAS as its backing BLAS implementation, as opposed to Accelerate.

This will only be possible once mxcl#14456 lands though, as without it I cannot enforce dependencies with certain options.

Contributor

samueljohn commented Jan 16, 2013

What if two different formulae require a usera/foo/suite-sparse and userb/baz/suite-sparse resp.?

As @mxcl said elsewhere, it is a feature that depends_on 'foo' can be satisfied by suite-sparse from different taps (only one can be active at a given time).

So the current work-around would be to name your suite-sparse like suite-sparse-julia and make it keg_only.

When we can depend on a formula with a certain option set, we should try to use that assure a certain feature is enabled.

Contributor

samueljohn commented Jan 16, 2013

I would even go so far, to say the current implementation is better and with @jacknagel's work on deps with options, we can soon handle 95% of the cases why people would want that feature.

As said above, the current work-a-round is: Name it differently and keg_only it. Or better, submit a PR. I for example, am willing to make TBB the default for suite-sparse.

Contributor

staticfloat commented Jan 18, 2013

Once we have dependency options, we can work around this, as we can add an option to suite-sparse to omit TBB. (Right now, TBB is the default for suite-sparse, which is the problem for Julia)

I would submit a PR to fix this, but I'm not very good with Ruby, and have a hard time figuring out what's going on. The best I can tell, it's because by the time things get to install_dependency, the dependency has had the tap information stripped out of it, effectively destroying all use of the depends_on 'username/tap/formula' syntax. I'm not sure why the tap gets stripped out, though.

Contributor

samueljohn commented Jan 19, 2013

As said, I think I don't want Julia to remove and replace the other
suite-sparse because it is used by other software, too.
Also, if the staticfloat/suite-sparse gets installed, I fear to get
bug reports with numpy etc. and I can't reproduce because I may think
its about the main suite-sparse. Those things are hard to debug.
Remember, both get installed to the Cellar/suite-sparse.

But I will do what I can to support your amazing work with Julia and
add options as you need. Really.

Alternatives:

  • name the suite-sparse differently and make it keg only. Eg
    "suite-sparse-julia"
  • Write a requirement that checks if a certain configuration is satisfying.
  • Wait for the options work of Jack to land and we will add the TBB option.

A formula should be able to request certain options but not from where
the formula comes from! Else we will end up in a mess with
non-reproducible setups.

Owner

MikeMcQuaid commented Jan 19, 2013

I'd like to see (if it's even possible) that two different versions explicitly depended on from different taps are both installable at once perhaps with different names/versions.

Contributor

samueljohn commented Jan 19, 2013

Mike, I am afraid, I don't get what you are wanting.

Owner

MikeMcQuaid commented Jan 19, 2013

As in either have suite-sparse from the julia tap installed as suite-sparse-julia without manual renaming (if you specify the full dependency to the tap) or install it as version e.g. 1.0.0-julia.

Contributor

staticfloat commented Feb 12, 2013

I've gone ahead and done as you suggested @MikeMcQuaid, thank you.

@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.