|
1 | 1 | # Upgrading Asimov |
2 | 2 |
|
| 3 | +## To v0.10.0 from v0.3.0 (the original `stevegrunwell/asimov`) |
| 4 | + |
| 5 | +Most people upgrading are coming from `0.3.0`, the version Homebrew shipped for years. |
| 6 | +It upgrades cleanly, but three leftovers can outlive it. Work through this in order. |
| 7 | + |
| 8 | +**Before you start: don't run `asimov` to check your version.** v0.3.0 parses no |
| 9 | +arguments at all — it ignores `--version`, `--help`, and every subcommand, and goes |
| 10 | +straight to scanning and writing Time Machine exclusions. Read the version out of the |
| 11 | +file instead: |
| 12 | + |
| 13 | +```sh |
| 14 | +grep -m1 -E '@version|ASIMOV_VERSION=' "$(command -v asimov)" |
| 15 | +``` |
| 16 | + |
| 17 | +### 1. Stop the schedule before you uninstall |
| 18 | + |
| 19 | +Uninstalling first leaves the LaunchAgent behind with nothing to run: |
| 20 | + |
| 21 | +```sh |
| 22 | +brew services stop asimov |
| 23 | +launchctl bootout gui/$(id -u)/homebrew.mxcl.asimov 2>/dev/null |
| 24 | +rm -f ~/Library/LaunchAgents/homebrew.mxcl.asimov.plist |
| 25 | +``` |
| 26 | + |
| 27 | +### 2. Replace the binary |
| 28 | + |
| 29 | +```sh |
| 30 | +brew uninstall asimov |
| 31 | +brew install asimov |
| 32 | +``` |
| 33 | + |
| 34 | +If `brew uninstall` reports `Permission denied @ apply2files`, the old cellar files are |
| 35 | +owned by another user — Homebrew prints the `sudo` command to force it, and that is safe |
| 36 | +here. |
| 37 | + |
| 38 | +### 3. Clear the old cache |
| 39 | + |
| 40 | +v0.10.0 keeps state in `~/.cache/asimov/`. If anything ever ran Asimov as root, those |
| 41 | +files are root-owned and unreadable by you: |
| 42 | + |
| 43 | +```sh |
| 44 | +rm -rf ~/.cache/asimov |
| 45 | +``` |
| 46 | + |
| 47 | +v0.10.0 and earlier crashed outright on this with a bare `Permission denied`. Current |
| 48 | +versions warn and carry on, but clearing it is still the fix. |
| 49 | + |
| 50 | +### 4. Check the result |
| 51 | + |
| 52 | +`doctor` exists only in current versions, so it comes last — there is nothing to run |
| 53 | +before the new binary is in place: |
| 54 | + |
| 55 | +```sh |
| 56 | +asimov doctor |
| 57 | +``` |
| 58 | + |
| 59 | +It reports a shadowed binary, a leftover schedule, an unreadable cache, and a bad config, |
| 60 | +and exits non-zero if it finds any. If it prints usage errors or starts a scan instead, |
| 61 | +an old binary is still first on your `PATH` — `doctor` names the one it found. |
| 62 | + |
| 63 | +### One thing that isn't broken |
| 64 | + |
| 65 | +Asimov is a one-shot scan, not a daemon. After `brew services start asimov`, `ps aux | |
| 66 | +grep asimov` finding nothing is expected: it scans, excludes, and exits. To confirm it is |
| 67 | +actually scheduled, use `asimov doctor`. |
| 68 | + |
3 | 69 | ## To v0.10.0 (from the `django23/asimov` fork) |
4 | 70 |
|
5 | 71 | `0.10.0` folds the fork's work (v0.4.0–v0.8.0, plus a `v0.9.0-beta` round) back into |
|
0 commit comments