-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Drop duplicated versions in salt.modules.pkg_resource.sort_pkglist() #12678
Conversation
Test Failed. If the failures are unrelated to your code, don't stress, a core developer will know these apart. |
@terminalmage Thanks a lot. I tried to do it this way but failed for some reason to do so. Will update the PR. |
No prob. Thanks for the PR! |
Test FAILed. |
Test PASSed. |
Test FAILed. |
…rsions Drop duplicated versions in salt.modules.pkg_resource.sort_pkglist()
@eliasp Is there an open bug report that this fixes? |
@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. |
OK cool, I just wanted to make sure that we closed out the associated issue, if there was one. Thanks again! |
This prevents having packages which report the same version multiple times such as
Duplicated version will be dropped to a result like this:
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.