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

How to remove in-app auto update and make brew cu take over all #154

Closed
hao-lh opened this issue Mar 31, 2020 · 7 comments
Closed

How to remove in-app auto update and make brew cu take over all #154

hao-lh opened this issue Mar 31, 2020 · 7 comments

Comments

@hao-lh
Copy link

hao-lh commented Mar 31, 2020

Hi there,

Thanks for developing this nice utility, which solved one of my major concern of updating Homebrew cask applications.

However, previous I checked some in-app auto update options and now want brew cu to take over of this all. I know this can be done by brew cu -a, but is some kind of verbose every time, then is there a way I can remove in-app update one by one or even by batch, so brew cu would update them automatically?

Thanks you so much!

@ondrejfuhrer
Copy link
Collaborator

Hello @hao-lh , thank you for using this. I'm not sure if I really get your point, what are you trying to achieve?

previous I checked some in-app auto update options and now want brew cu to take over of this all

I assume you allowed apps to check updates by themselves, right? By passing (as you correctly stated) -a it will also update those apps, so I assume everything is fine here?

but is some kind of verbose every time

Not sure what exactly is verbose, can you maybe add a screenshot what are you seeing?

is there a way I can remove in-app update one by one or even by batch, so brew cu would update them automatically?

By automatically you mean without adding the -a argument? That is currently not possible and not desired. Removing in-app update currently is only possible if you go to that specific app and disable that. But that doesn't allow updating them without -a as that "auto-update" flag is set on the cask configuration and cannot be overriden from outside.

I hope it is little bit cleaner, let me know if you have any particular things you would like to follow up of clarify more.

@hao-lh
Copy link
Author

hao-lh commented Apr 14, 2020

Hi @ondrejfuhrer Thank you for reaching me out and providing detailed explanation for this issue.
What I was meaning is that if you look at the last two columns, all updated checked within self update would be marked as Y in A/U column (autoupdate?) and PASS in Result column.

However, for some reason, I don't prefer self update within application any more, and want to brew cu to act as a unified application package manager, thus I wanted to remove these marks and let brew cu to completely take over. Also, the reason I do want pass -a argument is it would introduce extra step every time I need to update the applications.

Screen Shot 2020-04-14 at 8 12 21 AM

Thank you so much again for your explanations!

@ondrejfuhrer
Copy link
Collaborator

Thank you @hao-lh for the explanation, now I get that. The "column" you are talking about is not something you can actually change. That is set in the cask metadata (e.g. for a-better-finder-rename you can find it here).

Therefore in order to update those you have to pass -a or --all to the brew cu command to include those as well. But you can't pre-select which ones you want to update and which don't.

If you would like to always update only certain apps, I would suggest you you version pinning to pin apps that you don't want to update and then call brew cu --all to update the rest.

I'll also want to work on a "default behaviour config" (see #156) so that you don't have to add the --all option of you don't want to, but that only partially solves your thing.

Let me know if there is anything else I can help you with.

@hao-lh
Copy link
Author

hao-lh commented Apr 14, 2020

Thank you @ondrejfuhrer for pointing out, so FYI, A/U column is control by auto_updates field contained in *.rb file? What about the last Result column, can we made any changes to them?

My original intention was user may check self update by accident, so when you open the application it would ask user for permission if you need to upgrade it. But when you try to update with brew cu solution, you would see previous self updated application would be upgraded one more time, I guess there are some database similar thing caching the current version and latest version. That's why I wanted brew cu to completely take over this, of course brew cu -a is able to achieve this. Sorry for not be clear about this at the very beginning 😢

@yurikoles
Copy link
Contributor

@hao-lh you may try to add something like this to your ~/.bash_profile:

alias cask-upgrade='brew cu --all --yes'

Then just invoke cask-upgrade, that will do all the things.

@ondrejfuhrer
Copy link
Collaborator

@hao-lh

A/U column is control by auto_updates field contained in *.rb file?

Exactly.

self updated application would be upgraded one more time

Yes, that is unfortunately the case. There is another issue where we discuss "syncing" the auto-updated version back to the cask metadata, but unfortunately it is not as easy.

You can follow the discussion here: #153

Long story short, there is currently no way you can actually control that behaviour yourself (meaning set which will be updated and which won't, etc). Maybe something we will consider for the future.

@hao-lh
Copy link
Author

hao-lh commented Apr 14, 2020

Understood. So there is technical obstacles preventing you from doing so.
Really appreciate spending time explaining the underlying to me.

@hao-lh hao-lh closed this as completed Apr 14, 2020
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

3 participants