From 6ada80ed7e45ed630e4d9877a9b11e2dfddb4758 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 17 Oct 2026 04:10:16 +0000 Subject: Third part of the format-upgrade inclusion: add support in s6-rc-set-install Now that everything is in place, we go for the main thing: add snapshot support to s6-rc-set install. The workflow is: - check the major version of the old db against the current s6-rc - if the old db is up to date, nothing changes - otherwise: + find the snapshot corresponding to the old db + compile it + copy the snapshot db to the bootdir + call s6-rc-format-upgrade on it + atomically switch the bootdb to it. At this point the snapshot is the new bootdb: same as the old db, but with the correct major version. + unconditionally remove the old db + and now we can perform the regular s6-rc-update with the wanted set, since they have the same major. We also add --no-snapshot options to s6-rc-set-commit and s6-rc-set-install, and propagate them in the supporting functions, so users can manually skip all this bloat (and this is important for the initial install). All that remains is cleaning up obsolete snapshots. This will probably go at the end of s6-rc-set-install as well. --- package/deps.mak | 1 - 1 file changed, 1 deletion(-) (limited to 'package/deps.mak') diff --git a/package/deps.mak b/package/deps.mak index 16e54b6..30207bc 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -71,7 +71,6 @@ src/repo/s6rc_repo_setcompile.o src/repo/s6rc_repo_setcompile.lo: src/repo/s6rc_ src/repo/s6rc_repo_setcopy.o src/repo/s6rc_repo_setcopy.lo: src/repo/s6rc_repo_setcopy.c src/include/s6-rc/repo.h src/repo/s6rc_repo_setdelete.o src/repo/s6rc_repo_setdelete.lo: src/repo/s6rc_repo_setdelete.c src/include/s6-rc/repo.h src/repo/s6rc_repo_setuptodate.o src/repo/s6rc_repo_setuptodate.lo: src/repo/s6rc_repo_setuptodate.c src/include/s6-rc/config.h src/include/s6-rc/repo.h src/include/s6-rc/s6rc-utils.h -src/repo/s6rc_repo_snap_from_compiled.o src/repo/s6rc_repo_snap_from_compiled.lo: src/repo/s6rc_repo_snap_from_compiled.c src/include/s6-rc/repo.h src/repo/s6rc_repo_sv_bcmpr.o src/repo/s6rc_repo_sv_bcmpr.lo: src/repo/s6rc_repo_sv_bcmpr.c src/include/s6-rc/repo.h src/repo/s6rc_repo_sv_cmpr.o src/repo/s6rc_repo_sv_cmpr.lo: src/repo/s6rc_repo_sv_cmpr.c src/include/s6-rc/repo.h src/repo/s6rc_repo_sync.o src/repo/s6rc_repo_sync.lo: src/repo/s6rc_repo_sync.c src/include/s6-rc/repo.h -- cgit v1.3.1