-
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
Improve macOS homebrew support for cask packages #53756
Improve macOS homebrew support for cask packages #53756
Conversation
This PR breaks backward compatibility in terms that all salt recipes that install brew-cask packages with the namespace Those recipes must be changed from I tried sometime ago to get the same behaviour for brew-cask as with So I have used a second approach to get the correct namespace for each package. As mention in the official documentation, you can make your custom @Homebrew tap by creating a GitHub repository that begins by This behaviour also applies to official taps, so this is the reason why I have change the old namespace ( |
This PR is ready for review 🔍 |
ed584e6
to
aace02a
Compare
aace02a
to
b570a0e
Compare
It concerns me that we are making a backwards compatible change here. Normally if there is a backwards compatible change we have to follow the deprecating code docs here: https://docs.saltstack.com/en/latest/topics/development/deprecations.html and only deprecate it in two releases in the future. Is there a way we can allow both recipes going forward? also @weswhet can you review here as well? |
I’ll have a look when I get in the office. Thanks for the ping. |
Thank you for your response @Ch3LL One workaround to maintain backward compatibility could be to check in methods if name.startswith('caskroom/cask/'):
salt.utils.versions.warn_until(
'Neon',
'The \'caskroom/cask/\' namespace for brew-cask packages'
'is deprecated. Use \'homebrew/cask/\' instead.'
)
name = name.replace("caskroom/cask/", "homebrew/cask/") If this change looks good to you I can make it. 😀 |
would like to get @weswhet 's input on that approach as he is more familiar with these modules |
Also forgot to mention. We are very close to tagging v2019.2.1 and only merging in test fixes and pre-defined PRs. Are you okay moving this to the 2019.2 branch? |
No problem! Is this something that depends on me? |
It would be easier if you do it. You can try to change the branch in Github but there is likely to be some conflicts. Its probably easiest to just close here and re-submit against the 2019.2 branch. If you can't do it i can though. |
No problem! I'll do the change tomorrow! |
What does this PR do?
When listing Homebrew packages, cask packages do not have the right namespace when they are from a tap different from the default one.
This PR fixes this issue recovering the right namespace for each cask package.
Previous Behavior
New Behavior
Tests written?
Yes
Commits signed with GPG?
Yes