{"action":"created","issue":{"url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/4678","labels_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/4678/labels{/name}","comments_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/4678/comments","events_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/4678/events","html_url":"https://github.com/caskroom/homebrew-cask/issues/4678","id":34967945,"number":4678,"title":"Draft Roadmap: `brew cask upgrade`","user":{"login":"rolandwalker","id":727482,"avatar_url":"https://avatars.githubusercontent.com/u/727482?v=3","gravatar_id":"","url":"https://api.github.com/users/rolandwalker","html_url":"https://github.com/rolandwalker","followers_url":"https://api.github.com/users/rolandwalker/followers","following_url":"https://api.github.com/users/rolandwalker/following{/other_user}","gists_url":"https://api.github.com/users/rolandwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/rolandwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolandwalker/subscriptions","organizations_url":"https://api.github.com/users/rolandwalker/orgs","repos_url":"https://api.github.com/users/rolandwalker/repos","events_url":"https://api.github.com/users/rolandwalker/events{/privacy}","received_events_url":"https://api.github.com/users/rolandwalker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/caskroom/homebrew-cask/labels/roadmap","name":"roadmap","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2014-06-04T15:11:08Z","updated_at":"2015-11-08T18:30:49Z","closed_at":"2015-08-03T17:56:50Z","body":"## Explanation\r\n\r\n`brew cask upgrade` is frequently brought up on IRC, and there have been a few different issues and PRs where it is discussed (long-running: #309).\r\n\r\n`brew cask upgrade` is a high priority to me.  Homebrew-cask is not really a package manager without `upgrade`.  It is also important that when we do ship an `upgrade` verb, it actually works.\r\n\r\nThere are many prerequisites for our infrastructure to support a `brew cask upgrade` that works reliably, and a few things that should come along with it.\r\n\r\nFor the benefit of our users, and anyone who wants to participate in coding, here is a general roadmap that shows what some of us have been working on, and where we can go over upcoming months.  I plan to edit this comment in-place over time.\r\n\r\nWhy is so much attention paid to tokens and versioning?  Because Homebrew-cask uses a simple filesystem-as-a-datastore approach in which Cask tokens and version numbers are used as directory names.  We need to standardize tokens and versions so that files are stored in a predictable place on disk — and because there is no facility to handle renames sensibly.\r\n\r\nThis is only a draft. It is possible that there is disagreement among the maintainers about certain items.\r\n\r\n## Current Implementation\r\n\r\nHomebrew-cask is very good at installing, inconsistent on uninstalling, and mostly-incapable on upgrading.  Part of upgrading is implicit uninstalling, so `uninstall` must be made to work equally well as `install` does.\r\n\r\n## Roadmap\r\n\r\n- [ ] Standardize Cask tokens in repos (2090/2467)\r\n    - [x] Standardize tokens for app Casks (1312)\r\n    - [x] Standardize tokens for font Casks (778)\r\n    - [ ] Standardize tokens for Casks in `homebrew-versions` (102)\r\n    - [ ] Standardize tokens for pkg Casks (179)\r\n    - [ ] Standardize tokens for prefpane Casks (24)\r\n    - [ ] Standardize tokens for qlplugin Casks (22)\r\n    - [ ] Standardize tokens for manual-installer Casks (13)\r\n    - [ ] Standardize tokens for binary-only Casks (10)\r\n    - [ ] Standardize tokens for Casks in `homebrew-unofficial` (8)\r\n    - [ ] Standardize tokens for colorpicker Casks (6)\r\n    - [ ] Standardize tokens for screen-saver Casks (6)\r\n    - [x] ~~Standardize tokens for widget Casks (3, unimportant because they don't work)~~ (support for widgets has been removed as of #8751)\r\n    - [ ] Standardize tokens for service Casks (2)\r\n    - [ ] Standardize tokens for input-method Casks (1)\r\n    - [ ] Standardize tokens for none-of-the-above Casks (1, `adobe-air.rb`)\r\n- [ ] Standardize Cask version numbers in repos (778/2467)\r\n    - [ ] Standardize version numbers for app Casks (1312)\r\n    - [x] Standardize version numbers for font Casks (778)\r\n    - [ ] Standardize tokens for Casks in `homebrew-versions` (102)\r\n    - [ ] Standardize version numbers for pkg Casks (179)\r\n    - [ ] Standardize version numbers for prefpane Casks (24)\r\n    - [ ] Standardize version numbers for qlplugin Casks (22)\r\n    - [ ] Standardize version numbers for manual-installer Casks (13)\r\n    - [ ] Standardize version numbers for binary-only Casks (10)\r\n    - [ ] Standardize tokens for Casks in `homebrew-unofficial` (8)\r\n    - [ ] Standardize version numbers for colorpicker Casks (6)\r\n    - [ ] Standardize version numbers for screen-saver Casks (6)\r\n    - [ ] ~~Standardize version numbers for widget Casks (3, unimportant because they don't work)~~ Support for widgets removed as of #8751 \r\n    - [ ] Standardize version numbers for service Casks (2)\r\n    - [ ] Standardize version numbers for input-method Casks (1)\r\n    - [ ] Standardize version numbers for none-of-the-above Casks (1, `adobe-air.rb`)\r\n- [ ] Algorithmic token-generation and versioning\r\n    - [x] formalize token generation (#2659, #3175, #3255,  #3285, #3305, #3344)\r\n    - [x] write `generate_cask_token` script to generate tokens (#3443)\r\n    - [x] real-world testing period for `generate_cask_token` script\r\n    - [ ] roll current `generate_cask_token` script logic into `brew cask create`\r\n    - [ ] add version-number determination to `generate_cask_token`\r\n        - proposal: for app bundles, pull the version number from `Info.plist`\r\n    - [ ] add version-number determination to `brew cask create`\r\n- [ ] All pkg-based Casks must have `uninstall` stanzas\r\n    - [x] complete tracking issue at #3322 (almost finished, thanks to @alebcay)\r\n    - [ ] add a `brew cask audit` test to keep out any new entries without `uninstall`\r\n- [x] Make the `uninstall` stanza available to all Cask types\r\n- [x] Nail down changes to the DSL\r\n    - it will always be possible to add to the DSL, but it will become more difficult to remove from the DSL\r\n    - [x] remove `md5` stanza (#2931)\r\n    - [x] remove `sha1` stanza (#4264)\r\n    - [x] remove `no_checksum` stanza (#4689)\r\n    - [x] tracking issue for further DSL changes (#4688)\r\n- [ ] Use appcasts to detect updates\r\n    - [x] add `appcast` stanza to DSL (#3105)\r\n    - [x] snapshot appcast content and wait several weeks for real-world comparisons (was done for ~200 Casks on 3 March)\r\n    - [x] find standard Sparkle-based appcast URLs for all app Casks (#4412, #4646, #4648, #4674, #4780, #4783, #4829)\r\n    - [ ] find non-standard/non-Sparkle appcast URLs for all other self-updating apps (eg GitHub.app)\r\n        - [ ] recently-added `link` Casks\r\n        - [ ] non-`link` Casks\r\n        - [ ] Casks that use Sparkle with small modifications (check for Sparkle.Framework inside the App bundle)\r\n        - [ ] Casks that use Sparkle with `SUFeedURL` set to `SET_PROGRAMMATICALLY_BY_APPLICATION_HELPER`\r\n        - [ ] Casks that use non-Sparkle appcasting\r\n        - [ ] Casks that had `Info.plist` in unexpected location\r\n    - [x] extend appcast stanza to support sha256 hashes\r\n    - [ ] store expected appcast hashes inline with Casks\r\n    - [ ] ability to show appcast status in `brew cask list`\r\n    - [ ] generate automatic notifications to maintainers on appcast update\r\n    - [ ] start checking incoming Casks for appcasts routinely\r\n        - without imposing load on Cask authors\r\n        - `brew cask create` could do this if it is pointed at an app bundle\r\n- [ ] Migrate as many `'latest'`-scheme Casks to version numbers as possible\r\n    - prediction: we will never be able to entirely remove the `'latest'` scheme\r\n    - [ ] migrate to versioned download URLs revealed by appcasts\r\n    - [ ] migrate to versioned download URLs revealed by HTTP redirects\r\n    - [ ] migrate to versioned download URLs revealed by metadata? \r\n        - [x] new devscript to support this: `list_url_attributes_on_file`\r\n- [ ] Support for a `~/.brewcaskconfig` file\r\n    - git-style format\r\n    - bundle a license-compatible library as was done for the [plist parser](https://github.com/caskroom/homebrew-cask/blob/master/lib/plist/parser.rb), or roll our own\r\n    - the CLI should be able to write to the config file as with git\r\n    - support for environment variables should be REMOVED\r\n- [ ] Bookkeeping: keep records of what was done at install-time, as in #3066\r\n    - [ ] add new command verb to display the install record for a given cask\r\n- [ ] Make `brew cask uninstall` refer to the previously recorded Cask/version, rather than the current repo\r\n- [ ] Expose discrete installation phases with new command verbs\r\n    - [x] `fetch` (#2970)\r\n    - [ ] `stage`\r\n        - part of the reason to separate out staging is to implement `brew cask audit --stage`\r\n    - [ ] `preflight` (fairly unimportant)\r\n    - [ ] `link`\r\n        - ability to re-link already installed Cask\r\n        - ability to un-link Cask without removing it from Caskroom\r\n    - [ ] `postflight`\r\n    - [x] `zap` (new functionality; zap phase not implicit under default `install`)\r\n- [ ] New command verb to dump a shell script which will re-create the existing install\r\n    - desirable feature: option to use stored metadata instead of implicitly upgrading\r\n- [ ] New command verb to rename versioned Caskroom directories to match in-place updates performed independently by apps\r\n- [ ] `brew cask audit --stage`\r\n    - needed if we are going to start depending on `Info.plist`\r\n- [ ] New command verb `outdated` (#9490)\r\n    - consult `Info.plist` as well as versioned directory name\r\n    - leave room for the planned feature of managing multiple installed versions\r\n- [ ] Ability to remove currently-installed, but outdated (unlinked) versions.\r\n    - interface could be through `brew cask cleanup` as suggested in #4651\r\n- [ ] New command verb `upgrade`\r\n- [ ] Update `HACKING.md` re: upgrade verb"},"comment":{"url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/comments/154855814","html_url":"https://github.com/caskroom/homebrew-cask/issues/4678#issuecomment-154855814","issue_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/4678","id":154855814,"user":{"login":"salimane","id":403938,"avatar_url":"https://avatars.githubusercontent.com/u/403938?v=3","gravatar_id":"","url":"https://api.github.com/users/salimane","html_url":"https://github.com/salimane","followers_url":"https://api.github.com/users/salimane/followers","following_url":"https://api.github.com/users/salimane/following{/other_user}","gists_url":"https://api.github.com/users/salimane/gists{/gist_id}","starred_url":"https://api.github.com/users/salimane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salimane/subscriptions","organizations_url":"https://api.github.com/users/salimane/orgs","repos_url":"https://api.github.com/users/salimane/repos","events_url":"https://api.github.com/users/salimane/events{/privacy}","received_events_url":"https://api.github.com/users/salimane/received_events","type":"User","site_admin":false},"created_at":"2015-11-08T18:30:49Z","updated_at":"2015-11-08T18:30:49Z","body":"+1"}}