Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

--devel brews should be considered separately for outdated version comparision #11922

Closed
domoritz opened this Issue · 13 comments

3 participants

Dominik Moritz Charlie Sharpsteen Jack Nagel
Dominik Moritz

I installed a developer formula for open-scene-graph with brew install --devel and when I do brew outdated I get the following strange message.

open-scene-graph (3.1.1 < 3.0.1)

That does not seem right to me. Is there a way to fix that?

Charlie Sharpsteen
Collaborator

That does not seem right to me. Is there a way to fix that?

Currently, that is the expected behavior. We have very simple version comparison code. It looks at the version value for the "main" or "stable" URL and compares it to what is installed. If there is a difference then the formula is flagged as "outdated".

Dominik Moritz

I think it would be a good idea to also compare the version number to the dev version.

Charlie Sharpsteen
Collaborator

Agreed---the only reason this hasn't happened is that noone has written the code yet.

Dominik Moritz

Can you tell me where I can find the code so that I can fix it?

Charlie Sharpsteen
Collaborator

Sure, the code that calculates the list of outdated brews lives in brew outdated:

https://github.com/mxcl/homebrew/blob/00cd16f/Library/Homebrew/cmd/outdated.rb#L15-27

This is used by brew upgrade, but you have to watch out for places where f.installed? is used as a test to throw out "up to date" formulae:

https://github.com/mxcl/homebrew/blob/cf327ae/Library/Homebrew/cmd/upgrade.rb#L37

Dominik Moritz

@Sharpie Since I have never written a single line of ruby and you seem to be the expert I would like to ask you to write that. It does not seem to be too complicated but I just don't have the time to dig into it.

Thanks a lot.

Jack Nagel
Owner

It may make more sense to wait for Homebrew 2 to do this.

Dominik Moritz

I think that there are some Issues connected to this one: Issue #11391, and Issue #11267.

Jack Nagel
Owner

#11267 is only tangentially related, and I have a upcoming refactoring of formula specs that fixes it.

Jack Nagel
Owner

I should mention that my upcoming formula specs refactor will also stop flagging up-do-date devel versions as out of date.

Charlie Sharpsteen
Collaborator

It may make more sense to wait for Homebrew 2 to do this.

Given that Homebrew 2 is still at the "nebulous idea" stage, it may make sense to take care of this. Now that --devel has worked its way into a few popular builds, it seems there is a pretty steady stream of these issues. Plus, Homebrew/homebrew-science#7 may require some more flexible handling of version numbers depending on which path we decide to go down.

If nothing else, trying to deal with this will give us more experience upon which to build Homebrew 2.

Jack Nagel
Owner

The specs refactor is close to being ready, and I think I may work on this after it lands; I started on a proper Version class and it turns out that it can probably be done with minimal code churn.

Jack Nagel
Owner

This has been partially addressed by the specs refactor, in that devel brews are now factored into the Formula#installed? check. The rest will be addressed by current work on version comparison in #13308.

Jack Nagel jacknagel closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.