about summary refs log tree commit diff
path: root/scripts/install.sh
AgeCommit message (Collapse)Author
42 hoursinstall.sh: replace an existing root instead of failing on itPjotr
The first version worked exactly once. guix build --root cannot replace a root that already exists -- it answers guix build: error: failed to create GC root '.../root': File exists -- so the second run, which is the normal case, died before building. The script now removes the old symlink first and refuses to touch anything that is not a symlink, since a directory at that path is someone else's mistake. Verified by running it three times in a row against a tree that changed between runs (adding this file moves the store path, which is what makes the root worth having).
42 hoursinstall.sh: build, root and link, so no store path is ever written downPjotr
guix build -f guix.scm prints a path that changes with every rebuild of the tree, so the practical way to use it has been to copy a store hash into a script -- and a copied hash outlives the source. That is not hypothetical: a store on this box was created by a binary that predated the gist column, and the mismatch surfaced as an empty 'sql error (Error):' at write time. scripts/install.sh builds from this checkout, GC-roots the result (AI_MEMORY_ROOT, default ~/.local/state/ai-memory/root) so a guix gc cannot take it away, links AI_MEMORY_LINK (default ~/.local/bin/ai-memory) so nobody has to remember a hash, and then runs the binary once to prove it starts. Two builds in a row give the same store path, which is what makes the root stable between runs and not merely between rebuilds of the same day. README and doc/SKILL.md now lead with it, and keep the bare guix build as the unpinned alternative.