Homebrew / homebrew-bundle

📦 Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.
MIT License
5.36k stars 288 forks source link

confused about upgrades #673

Closed endquote closed 4 years ago

endquote commented 4 years ago

I set up a new system by creating a Brewfile which installed all manner of brew formulae and mas apps. It's a thing of beauty.

I thought I could upgrade things as needed by running brew bundle again, since the docs say "If a dependency is already installed and there is an upgrade available it will be upgraded."

So I was confused to find that brew bundle says using... all the things, states that are all installed, but doesn't mention anything about upgrades. brew bundle check states that "The Brewfile's dependencies are satisfied," and nothing about upgrades. Yet brew upgrade -d lists a bunch of things that can be upgraded, and the MAS is informing me of updates too.

I'm guessing this is user error or a misunderstanding. Does bundle not have an "upgrade everything" command?

MikeMcQuaid commented 4 years ago

Upgrades are done by default unless you pass --no-upgrade.

endquote commented 4 years ago

Gotcha, that's what I thought -- however I'm finding that brew upgrade is reporting that there are upgrades available, but brew bundle isn't doing any upgrading.

MikeMcQuaid commented 4 years ago

however I'm finding that brew upgrade is reporting that there are upgrades available, but brew bundle isn't doing any upgrading.

To confirm: brew outdated $(brew bundle list) reports outdated versions of things in the Brewfile but doesn't upgrade them? If so, can you provide details of the contents of your Brewfile and whatever isn't being upgraded?

endquote commented 4 years ago

I believe this indicates that there's nothing to upgrade:

$ brew bundle check --verbose
The Brewfile's dependencies are satisfied.

Yet this says there are outdated packages:

$ brew upgrade -n
Would upgrade 4 outdated packages:
mongodb/brew/mongodb-community 4.2.3 -> 4.2.5
glib 2.64.1 -> 2.64.1_1
graphite2 1.3.13 -> 1.3.14
cairo 1.16.0_2 -> 1.16.0_3

Though mas outdated didn't have any output either, yet the App Store popped up prompting to download an update.

Here is the Brewfile.

# https://github.com/Homebrew/homebrew-bundle

cask_args appdir: "/Applications"

brew "cloc"
brew "ffmpeg"
brew "git"
brew "git-lfs"
brew "http-server"
brew "imagemagick"
brew "node"
brew "pngcrush"
brew "python"
brew "speedtest-cli"
brew "sshuttle"
brew "telnet"
brew "youtube-dl"

tap "mongodb/brew"
brew "mongodb-community", restart_service: :changed

tap "homebrew/cask"
cask "1Password"
cask "adobe-creative-cloud"
cask "charles"
cask "cleanmymac"
cask "fluid"
cask "google-chrome"
cask "iina"
cask "istat-menus"
cask "iterm2"
cask "keyboardcleantool"
cask "moom"
cask "nightowl"
cask "plex"
cask "private-internet-access"
cask "resolutionator"
cask "robo-3t"
cask "signal"
cask "skype-for-business"
cask "slack"
cask "thingsmacsandboxhelper"
cask "transmit"
cask "visual-studio-code"
cask "whatsapp"
cask "zoomus"

tap "homebrew/cask-fonts"
cask "font-ibm-plex"

# https://github.com/mas-cli/mas
brew "mas"
mas "Numbers", id: 409203825
mas "Pages", id: 409201541
mas "Keynote", id: 409183694
mas "iMovie", id: 408981434
mas "Adblock Plus for Safari", id: 1432731683
mas "bookmarker for pinboard", id: 1451400394
mas "DaisyDisk", id: 411643860
mas "Deliveries", id: 924726344
mas "Ghostery Lite", id: 1436953057
mas "Microsoft Remote Desktop 10", id: 1295203466
mas "Reeder 4", id: 1449412482
mas "Spark - Email App by Readdle", id: 1176895641
mas "Things 3", id: 904280696
mas "TNEF's Enough", id: 986621173

I already did upgrade things with brew upgrade and the App Store, so I wouldn't be able to repro the situation right now.

MikeMcQuaid commented 4 years ago

This is expected. The software listed in your Brewfile is not outdated.

endquote commented 4 years ago

I see, so the dependencies don't count. It seems like mongodb-community was outdated though?

Thanks for clarifying how it works, I'll just run bundle periodically and see what updates it catches in the future.

MikeMcQuaid commented 4 years ago

It seems like mongodb-community was outdated though?

That may be a bug related to tap handling. We'd accept a PR or if you can open a new issue scoped to just that with a reproducible test case we'd leave it open.