Homebrew-cask: glob expansion in `zap :delete` and `uninstall :delete`

Created on 20 Feb 2017  路  17Comments  路  Source: Homebrew/homebrew-cask

Done in https://github.com/Homebrew/brew/pull/2042. We now need to:

  • [x] Add it to the documentation.
  • [x] Add it to casks (many have it in a commented TODO).

All 17 comments

Hello @vitorgalvao I would like to get stuck into this, but I am not 100 % certain what is required.

For example, looking at the balsamiq-mockups Cask, is what you have on mind as simple as it states in the commented TODO?

Finally, would it be better to have glob expansions everywhere where possible, like in an uninstall :pkgutil for example?

I would like to get stuck into this, but I am not 100 % certain what is required.

You mean you want to get assigned? Done. You should also be able to self-assign (or unassign) with the options to the right of the conversation.

For example, looking at the balsamiq-mockups Cask, is what you have on mind as simple as it states in the commented TODO?

Yes. In those cases, removing the # TODO: expand/glob for should suffice.

Finally, would it be better to have glob expansions everywhere where possible, like in an uninstall :pkgutil for example?

No. If we can accurately pinpoint the files and there鈥檚 only a few of them, we should spell them out. When there are too many/we don鈥檛 know them all and we can target them specifically with a glob, without catching what we shouldn鈥檛, we use the glob.

@vitorgalvao all done except for the hipchat Cask, which states:

# TODO: expand/glob for '~/Library/<userid>/HipChat/'

I am not sure this makes sense?

@miccal '~/Library/*/HipChat/' might work, but it鈥檇 have to be tested.

@vitorgalvao thanks for that - I do not have a testing machine at the moment, but I can test it in a few days.

# TODO: expand/glob for '~/Library/<userid>/HipChat/'

does not make sense to me either. These files were present after installing, starting, but not really doing anything, and then stopping HipChat:

~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.hipchat.hipchat.sfl
~/Library/Application Support/com.hipchat.HipChat
~/Library/Caches/com.crashlytics.data/com.hipchat.HipChat
~/Library/Caches/com.hipchat.HipChat
~/Library/Caches/Homebrew/Cask/hipchat--4.29.0-732.zip
~/Library/Logs/HipChat
~/Library/Preferences/com.hipchat.HipChat.plist

While '~/Library/*/HipChat/' works fine (removes e.g. ~/Library/Logs/HipChat, which I had removed from the zaplist before testing), it is not needed.

@neutric by "stopping" to you mean just quitting the app, for something more?

Do you mean that ~/Library/<userid>/HipChat/ was created while the app is running, and deleted when stopped?

By stopping I mean quitting, yes. What I wanted to say is that all I did was install, start the app so it can create its files, and then quit it. It is possible that more files are created once you really use the app, which I didn't. Then I searched with find . -iname "*hipchat*" which produced the above list of files. Nothing that matches ~/Library/<userid>/HipChat/, so a '~/Library/*/HipChat/' in the zap list is probably not necessary.

Ah OK - I guess that the <userid> is a user's login name. You did not create an account and log into the app, I assume?

Correct. But why on earth would it create a folder <userid>/HipChat/ under ~/Library/? HipChat/<userid>/ would make sense to me, but the other way around?

But why on earth would it create a folder <userid>/HipChat/ under ~/Library/?

Bad design?

-.-

I can confirm @neutric's finding - there is no ~/Library/<userid>/HipChat/ created when installing, and creating a login is too complicated.

@Tenzer, @chaseroden, @cliffcotino you have all updated this Cask in the past - are you able to shed any light on this?

[jeppe@reventon ~/Library]$ find . -iname '*hipchat*'
./Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.hipchat.hipchat.sfl
./Application Support/com.hipchat.HipChat
./Application Support/Google/Chrome/Default/Local Storage/<website>_0.localstorage
./Application Support/Google/Chrome/Default/Local Storage/<website>_0.localstorage-journal
./Caches/com.apple.nsurlsessiond/Downloads/com.hipchat.HipChat
./Caches/com.crashlytics.data/com.hipchat.HipChat
./Caches/com.hipchat.HipChat
./Caches/HipChat
./Caches/io.fabric.sdk.mac.data/com.hipchat.HipChat
./HipChat
./Logs/HipChat
./Preferences/com.hipchat.HipChat.plist
./WebKit/com.hipchat.HipChat
./WebKit/com.hipchat.HipChat/WebsiteData/LocalStorage/<website>._0.localstorage
./WebKit/com.hipchat.HipChat/WebsiteData/LocalStorage/<website>._0.localstorage-shm
./WebKit/com.hipchat.HipChat/WebsiteData/LocalStorage/<website>._0.localstorage-wal

Note that I have normalised the lines which contain <website>. They originally contained the URL of the internal, self hosted HipChat instance we use at work, and I don't want to make the hostname of that public.

Thank you @Tenzer for your help.

@vitorgalvao it seems that there is no glob expansion required for the hipchat Cask, so I think we can call this completed?

Thank you @miccal!

You're welcome as always @vitorgalvao.

Was this page helpful?
0 / 5 - 0 ratings