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

Update functionality does not work as expected #88

Open
seanabraham opened this issue Oct 31, 2017 · 3 comments
Open

Update functionality does not work as expected #88

seanabraham opened this issue Oct 31, 2017 · 3 comments

Comments

@seanabraham
Copy link

seanabraham commented Oct 31, 2017

I can't seem to get the update block to ever trigger. I have a package installed via this Homebrew provider, there is a newer one available and I've specified ensure => latest however nothing gets upgraded. I've tried setting ensure to a specific version, 3.3 for example but it fails with package-name-3.3 not found.

When setting ensure => latest I've seen Listing installed packages and Found package package-name in the logs (among some /usr/bin/stat) calls, but no calls to brew upgrade

Any ideas? Is there something I'm missing @TheKevJames?

@jordigg
Copy link
Contributor

jordigg commented Nov 16, 2017

@seanabraham is this brew or brew cask. Is it happening on a specific package?
brew cask will only update/upgrade packages that don't have their own auto-updater.

https://github.com/Homebrew/brew/blob/6c9ff7f6429aaa5504ea862dc661ecdd5812561a/docs/Manpage.md

HOMEBREW_NO_AUTO_UPDATE: If set, Homebrew will not auto-update before running brew install, brew upgrade or brew tap.

@jordigg
Copy link
Contributor

jordigg commented Mar 13, 2018

To add to this I just started having issues when a package, in this example, packer is being installed using the latest parameter and the package is not already on the system. The module will try to upgrade it instead of installing it and will fail.

Not sure if something changed on brew recently. Maybe the old behaviour was that if you tried to do an upgrade and the package wasn't present it would fall-back to do an install?

To fix this, we'll need to do the following when using latest:

  1. if the package IS already installed use upgrade
  2. if the package is NOT already installed, fallback and use install.

@guillaume-ferry
Copy link

Same issue as @seanabraham , using ensure => latest
No packages upgrades until user triggers manualy an update with brew update

  • Tested on macOS 10.13, 10.14, 10.15.
  • Problem occurs with any Casks.

It seems that brew does not updates before executing brew cask install.

As brew update takes less than 1s when all taps are up to date, il would be interesting to make it possible to automate or schedule brew update like apt update in apt puppet module : https://forge.puppet.com/puppetlabs/apt#update-the-list-of-packages

Is there a way to solve this?
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants