salt icon indicating copy to clipboard operation
salt copied to clipboard

Use --json=v2 for listing macOS brew casks

Open cdalvaro opened this issue 5 years ago • 12 comments

What does this PR do?

It simplifies and improves support for listing macOS brew casks.

Since Homebrew 2.6.0 (Homebrew/brew#8899), all brew cask commands have been deprecated in favour of brew commands (with --cask) when necessary. So now, any cask from official taps can be installed/removed without specifying its corresponding tap.

For example:

visual-studio-code:
  pkg.installed

can be used for installing VS Code instead of using:

homebrew/cask/visual-studio-code:
  pkg.installed

This PR also adds support for listing casks upgrades (mac_brew.list_upgrades(include_casks=True)) and getting casks info (mac_brew.info_installed("cask_name"))

Merge requirements satisfied?

  • [x] Changelog - https://docs.saltstack.com/en/master/topics/development/changelog.html
  • [x] Tests written/updated
  • [x] Requires PR homebrew/brew#10540

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

This PR closes #24653

cdalvaro avatar Feb 05 '21 18:02 cdalvaro

Please @twangboy, tell me if something is wrong with this issue. I created it more than 1 month ago and no one has commented or approved it.

cdalvaro avatar Mar 18 '21 16:03 cdalvaro

Please @twangboy, tell me if something is wrong with this issue. I created it more than 1 year ago and no one has commented or approved it.

cdalvaro avatar Mar 23 '22 10:03 cdalvaro

Excuse me for adding you to this PR @weswhet, but this PR has been open for over a year and no one has approved it or asked for changes.

Could you review it, please?

cdalvaro avatar Apr 29 '22 10:04 cdalvaro

Hey, @cdalvaro can you bring it up to date with master? otherwise it looks good to me. @garethgreenaway @s0undt3ch could you have a look at this since I don't have permission to approve it.

weswhet avatar Apr 29 '22 16:04 weswhet

Done! Many thanks @weswhet for reviewing it!

cdalvaro avatar Apr 30 '22 14:04 cdalvaro

This PR needs to be rebased due to conflicts.

Could you take care of it @cdalvaro please?

s0undt3ch avatar May 23 '22 11:05 s0undt3ch

Due to some directory changes for the file test_mac_brew_pkg.py I think I have lost some tests.

I'm working on recovering them...

cdalvaro avatar May 23 '22 11:05 cdalvaro

I think I have recovered all of them ... Tests will fail if I have forgotten something 🤞

cdalvaro avatar May 23 '22 12:05 cdalvaro

Done! I think that CI failures are not related with my changes

cdalvaro avatar May 23 '22 15:05 cdalvaro

Could this PR be merged for the next salt release, please?

cdalvaro avatar Jun 14 '22 05:06 cdalvaro

1.5 years since this PR was created

cdalvaro avatar Sep 01 '22 15:09 cdalvaro

Please @Ch3LL, could you review this PR?

cdalvaro avatar Sep 02 '22 05:09 cdalvaro

Thanks @Ch3LL !!

cdalvaro avatar Sep 22 '22 10:09 cdalvaro