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

Improve cask --adopt to only care about the installed version if auto_update is false #18405

Open
1 task done
ctaintor opened this issue Sep 25, 2024 · 1 comment
Open
1 task done
Labels
features New features help wanted We want help addressing this

Comments

@ctaintor
Copy link
Contributor

Verification

Provide a detailed description of the proposed feature

I believe with #16889, the cask --adopt logic started failing to adopt if the installed application version was not the same as the "to be installed" version. For our organization, this means that the moment there is a new cask version, anyone who runs a cask --adopt will get a failure, requiring them to go into the application and manually update. What we'd expect instead is that if the application's update lifecycle is handled by the application (and not brew) then brew would happily adopt it whether it is the exact same version or not.

I propose that the --adopt logic is changed to only care about the installed version if the cask formula has auto_update false. (somewhat related to this, it would be amazing if we could also avoid downloading the cask if the application is already installed and we will --adopt it.)

What is the motivation for the feature?

In the current state, adopting causes more problems than it helps. This is both because it requires people to act on something (do an update) for the brew install to work and that the action they need to take is confusing to them (few understand that what this is saying is "go into the application and manually update it" – they just think of it as a failure that they can't overcome).

How will the feature be relevant to at least 90% of Homebrew users?

I believe this would make --adopt behave as people would expect it to.

What alternatives to the feature have been considered?

  • could use --force I think? However, we don't generally want Homebrew to manage the version lifecycle.
  • simply stop using --adopt and, outside of brew, remove the application and then install it from Brew the first time.

One of these alternatives is what we will do if adjusting how --adopt works is rejected.

@ctaintor ctaintor added the features New features label Sep 25, 2024
@MikeMcQuaid
Copy link
Member

I believe with #16889, the cask --adopt logic started failing to adopt if the installed application version was not the same as the "to be installed" version.

It's the other way around: #16889 made it more permissive, not less.

I propose that the --adopt logic is changed to only care about the installed version if the cask formula has auto_update false.

I agree with this, it makes sense to me 👍🏻

somewhat related to this, it would be amazing if we could also avoid downloading the cask if the application is already installed and we will --adopt it.)

I agree this would be amazing but also think this would require additional verification e.g. checksum/signature/etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features New features help wanted We want help addressing this
Projects
None yet
Development

No branches or pull requests

2 participants