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

audit: "version should not decrease" check ignores version_scheme #1489

Closed
zmwangx opened this issue Nov 12, 2016 · 1 comment
Closed

audit: "version should not decrease" check ignores version_scheme #1489

zmwangx opened this issue Nov 12, 2016 · 1 comment
Assignees
Labels
bug Reproducible Homebrew/brew bug

Comments

@zmwangx
Copy link
Contributor

zmwangx commented Nov 12, 2016

Sample false positive: Homebrew/homebrew-core#6863.

Code in question from audit.rb:

    versions = attributes_map[:version].values.flatten
    if !versions.empty? && formula.version < versions.max
      problem "version should not decrease"
    end

When version_scheme was bumped at some point, e.g., in the case of pyenv, versions will contain:

1.0.2
1.0.2
1.0.1
1.0.0
20160726
20160629
20160628
20160509
20160422
20160310

and a new version number like 1.0.3 will be smaller than versions.max.

@zmwangx
Copy link
Contributor Author

zmwangx commented Nov 12, 2016

Probably the proper solution is to compare against the latest version (including the version scheme), not all versions. Homebrew/homebrew-core#6835 (comment) which @ilovezfs brought to my attention should also be resolved that way.

@ilovezfs ilovezfs added the bug Reproducible Homebrew/brew bug label Nov 13, 2016
@ghost ghost assigned MikeMcQuaid Nov 13, 2016
@ghost ghost added the in progress Maintainers are working on this label Nov 13, 2016
@ghost ghost removed the in progress Maintainers are working on this label Nov 13, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug
Projects
None yet
Development

No branches or pull requests

3 participants