You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to re-raise #49127 and other tickets filed for this. I believe the original justification given doesn't address the problems that pinning would solve. Therefore, the topic requires a reconsideration.
A huge chunk of casks auto-update and we can’t stop that. So pin would at best be inconsistent and not work in a lot of cases.
If you do a search you’ll see we’ve discussed this in the past, especially in the upgrade issues on brew’s repository.
Argument 1: a counter-argument to "pin would at best be inconsistent and not work in a lot of cases"
Casks with auto_updates are effectively pinned. brew upgrade will not update them, unless --greedy-auto-updates is passed. They may be upgraded externally by the application itself, and Homebrew won't know the actual version installed over time or what files were modified...
...so how is this different from an explicit pin on the package? auto_updates and latest markers are pins. Permanent ones that prevent them from being upgraded on brew upgrade - but still pins. They just can't be arbitrarily removed or added by the user to achieve their own goals.
Argument 2: auto-update feature is often optional, let brew do it
Out of all my auto_updates casks listed with brew info --json=v2 --installed --casks | jq -r '.casks[] | select(.auto_updates) | .token', most have optional auto-updates:
Check and update mandatory: adobe-acrobat-reader, discord, dropbox, google-chrome, onedrive, signal
How do I update all packages except these listed in "Check and update mandatory" category, without this kind of trickery? brew upgrade --cask --greedy-auto-updates $(brew info --json=v2 --installed --casks | jq -r '.casks[] | select(.auto_updates) | .token' | grep -vE '^(adobe-acrobat-reader|discord|dropbox|onedrive|signal)$')
There is absolutely nothing wrong about brew pin adobe-acrobat-reader discord dropbox google-chrome onedrive signal so we can brew update --greedy-auto-updates and get everything up-to-date except the ones we pinned.
Argument 3: the fundamental issue
All package manager in existence - except pkgin/pksrc and Homebrew (for casks) - allow their users to "upgrade all except these":
pacman -Syu --ignore <pkg1>,<pkg2>
apt-mark hold <pkg1> <pkg2>; apt upgrade; apt-mark unhold <pkg1> <pkg2>
Why would one want to "upgrade all except these"? Every user has their own reasons. For me:
I do it to skip large packages when my download speed is limited at that time. I tend to run pacman -Syu --ignore libreoffice-fresh,signal quite a bit.
There are certain packages that I update myself. On Arch, I never update linux and linux-lts packages at the same time. linux-lts stays in IgnorePkg (it's pinned).
For Homebrew specifically, I'd like to execute brew update --greedy-auto-updates and get everything upgraded except for those that perform mandatory updates. Whether that's via a permanent pin brew pin signal; brew update --greedy-auto-updates, or a one-time exclusion brew update --greedy-auto-updates --ignore pkg1,pkg2, it's all good.
...But most importantly: why not? All other package manager do it, and there must be many good reasons why.
nowaker@nwkr-m1pro ~ % brew pin nextcloud --verbose --debug
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::NullLoader): loading nextcloud
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::NullLoader): loading nextcloud
Error: No available formula with the name "nextcloud".
/opt/homebrew/Library/Homebrew/formulary.rb:826:in 'Formulary::NullLoader#get_formula'
/opt/homebrew/Library/Homebrew/formulary.rb:931:in 'Formulary.factory'
...not relevant
Output of brew doctor and brew config
irrelevant
Output of brew tap
homebrew/cask-versions
homebrew/services
The text was updated successfully, but these errors were encountered:
@Nowaker, Thanks for the detailed background here.
I think it is definitely something that could be beneficial for users and a worthwhile consideration.
Generally, with feature requests within Homebrew, they are moved forward when a contributor opens a pull request to get the process started. Is this something that you would have the capacity to have a look at?
@bevanjkay I could try my best, for sure. But in my view, the biggest issue with brew pin for casks wasn't lack of contributors, but rather, it was a direct disapproval of the feature itself. So it would be best to secure support from the Homebrew Cask's higher ups before investing time in coding. :-)
Verification
--force
.brew update-reset && brew update
and retried my command.brew doctor
, fixed as many issues as possible and retried my command.Description of issue
I'd like to re-raise #49127 and other tickets filed for this. I believe the original justification given doesn't address the problems that pinning would solve. Therefore, the topic requires a reconsideration.
Argument 1: a counter-argument to "pin would at best be inconsistent and not work in a lot of cases"
Casks with
auto_updates
are effectively pinned.brew upgrade
will not update them, unless--greedy-auto-updates
is passed. They may be upgraded externally by the application itself, and Homebrew won't know the actual version installed over time or what files were modified......so how is this different from an explicit pin on the package?
auto_updates
andlatest
markers are pins. Permanent ones that prevent them from being upgraded onbrew upgrade
- but still pins. They just can't be arbitrarily removed or added by the user to achieve their own goals.Argument 2: auto-update feature is often optional, let brew do it
Out of all my
auto_updates
casks listed withbrew info --json=v2 --installed --casks | jq -r '.casks[] | select(.auto_updates) | .token'
, most have optional auto-updates:How do I update all packages except these listed in "Check and update mandatory" category, without this kind of trickery?
brew upgrade --cask --greedy-auto-updates $(brew info --json=v2 --installed --casks | jq -r '.casks[] | select(.auto_updates) | .token' | grep -vE '^(adobe-acrobat-reader|discord|dropbox|onedrive|signal)$')
There is absolutely nothing wrong about
brew pin adobe-acrobat-reader discord dropbox google-chrome onedrive signal
so we canbrew update --greedy-auto-updates
and get everything up-to-date except the ones we pinned.Argument 3: the fundamental issue
All package manager in existence - except pkgin/pksrc and Homebrew (for casks) - allow their users to "upgrade all except these":
pacman -Syu --ignore <pkg1>,<pkg2>
apt-mark hold <pkg1> <pkg2>; apt upgrade; apt-mark unhold <pkg1> <pkg2>
dnf upgrade --refresh --exclude=<pkg1>,<pkg2>
dnf versionlock add <pkg1> <pkg2>; dnf upgrade --refresh; dnf versionlock delete <pkg1> <pkg2>
yum update --exclude=<pkg1>,<pkg2>
yum versionlock add <pkg1>-* <pkg2>-*; yum update; yum versionlock delete <pkg1>-* <pkg2>-*
zypper up --exclude <pkg1>,<pkg2>
zypper addlock <pkg>; zypper up; zypper removelock <pkg>
emerge -avuD --exclude <pkg1>,<pkg2> @world
=<pkg>-*
to/etc/portage/package.mask
choco upgrade all --except=<pkg1>,<pkg2>
choco pin add -n=<pkg>; choco upgrade all; choco pin remove -n=<pkg>
winget pin add --id <PackageID>; winget upgrade --all; winget pin remove --id <PackageID>
scoop hold <pkg1> <pkg2>; scoop update *; scoop unhold <pkg1> <pkg2>
port upgrade outdated and not <port>
brew pin something; brew upgrade; brew unpin something
Why would one want to "upgrade all except these"? Every user has their own reasons. For me:
pacman -Syu --ignore libreoffice-fresh,signal
quite a bit.linux
andlinux-lts
packages at the same time.linux-lts
stays inIgnorePkg
(it's pinned).brew update --greedy-auto-updates
and get everything upgraded except for those that perform mandatory updates. Whether that's via a permanent pinbrew pin signal; brew update --greedy-auto-updates
, or a one-time exclusionbrew update --greedy-auto-updates --ignore pkg1,pkg2
, it's all good.Argument 4: by popular vote
Users have been requesting it all the time:
brew pin
for casks #100700 by @alexregbrew upgrade
fails forever when installed casks become uninstallable #97285 by @nopdotcomUsers simply want this feature.
Thank you in advance for reconsidering this.
Command that failed
brew pin nextcloud
Output of command with
--verbose --debug
Output of
brew doctor
andbrew config
Output of
brew tap
The text was updated successfully, but these errors were encountered: