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

Drop duplicated versions in salt.modules.pkg_resource.sort_pkglist() #12678

Merged

Conversation

eliasp
Copy link
Contributor

@eliasp eliasp commented May 10, 2014

This prevents having packages which report the same version multiple times such as

microsoft.office = ["15.0.4569.1506","15.0.4569.1506"]

Duplicated version will be dropped to a result like this:

microsoft.office = ["15.0.4569.1506"]

This is a result of software being registered in 2 places (registry + MSI) at the same time on Windows.
I implemented this in salt.modules.pkg_resource.sort_pkglist() as a general safety measure to prevent this from happening in other situations again as it lead to quite some unstable behaviour in other modules here.

@ghost
Copy link

ghost commented May 11, 2014

Test Failed.

If the failures are unrelated to your code, don't stress, a core developer will know these apart.
In the future, if possible, please branch off a passing commit to avoid false positives.
Refer to this link for build results: http://jenkins.saltstack.com/job/salt-pr-build/4216/

@eliasp
Copy link
Contributor Author

eliasp commented May 11, 2014

@terminalmage Thanks a lot. I tried to do it this way but failed for some reason to do so. Will update the PR.

@terminalmage
Copy link
Contributor

No prob. Thanks for the PR!

@ghost
Copy link

ghost commented May 11, 2014

Test FAILed.
Refer to this link for build results: http://cookingwithsalt.org/job/salt/job/pr/job/build/24761/

@ghost
Copy link

ghost commented May 11, 2014

Test PASSed.
Refer to this link for build results: http://jenkins.saltstack.com/job/salt-pr-build/4218/

@ghost
Copy link

ghost commented May 11, 2014

Test FAILed.
Refer to this link for build results: http://cookingwithsalt.org/job/salt/job/pr/job/build/24762/

terminalmage pushed a commit that referenced this pull request May 11, 2014
…rsions

Drop duplicated versions in salt.modules.pkg_resource.sort_pkglist()
@terminalmage terminalmage merged commit d174a5c into saltstack:develop May 11, 2014
terminalmage added a commit that referenced this pull request May 11, 2014
terminalmage added a commit that referenced this pull request May 11, 2014
@terminalmage
Copy link
Contributor

@eliasp Is there an open bug report that this fixes?

@eliasp
Copy link
Contributor Author

eliasp commented May 11, 2014

@terminalmage No, there's no bug addressing this specific issue, but right now it looks like at least #11602 might be partially affected by this.

I also remember having seen duplicated pkg versions in some other cases during the last week when running into trouble (unfortunatley no properly documented ones) - some of them might have been fixed as as sideeffect of my other recent PRs regarding win_pkg.

@eliasp eliasp deleted the pkg_resource-deduplicate-pkg-versions branch May 11, 2014 03:13
@terminalmage
Copy link
Contributor

OK cool, I just wanted to make sure that we closed out the associated issue, if there was one. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ZZZ[Done]-back-ported-bf RETIRED The pull request has been back-ported to an older branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants