forked from heavy-duty/box
had_install was computed AFTER the pre-0.7.0 migration block, so it observed a versions/ directory that the migration had just created one line earlier. A flat /opt/box therefore read as "already installed", host/setup-host.sh was skipped, and the host kept every artifact the old release left behind while box --version reported the new one — silent, and self-concealing. Computing it BEFORE the migration asks the honest question: a tree that needs migrating has by definition never been converged by this version's setup-host. The accepted consequence: an unattended (BOX_YES=1) upgrade on a flat-tree host now runs setup-host, which the #66 note cautions about. setup-host converges and is idempotent, and a release whose host half is silently missing is the worse failure. Once setup-host can run at all, a second defect in the same block becomes reachable: it went through $DEST/current, but the #66 guard holds the default under existing boxes, so on such a host current still names the OLD version — converging the host with the previous release's host scripts. It now runs the installed version's own tree. Separately, the migration named itself but not the lifecycle: the old tree becomes a first-class 'box versions' entry the operator never installed and cannot tell apart from a deliberate rollback target. The migration line now names both ways out, and the closing summary re-states it, since the original line scrolls past ~250 lines before the install ends. test/cli.sh gains an inst_setup helper (no BOX_SKIP_SETUP_HOST) and a stub host/setup-host.sh on the fabricated upgrade source, so the flat-tree fixture proves end to end and fully offline that host setup runs — and that a genuinely versioned tree still skips it. Refs #115, #117 |
||
|---|---|---|
| .. | ||
| cli.sh | ||
| labels-reconcile.sh | ||
| release.sh | ||