aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-20 11:11:56 +0200
committerDanilo M. <danix@danix.xyz>2026-10-20 11:11:56 +0200
commitf5b14ff16f145d82507e7acdd933d9bf068f3ef7 (patch)
tree4f6db1b25c106aa3ea93b6c9d6877379b8d42346
parente6ac42e158ed5ceee2c58eaf2f23a0ad3bb82f41 (diff)
downloadslackrepo_setup-f5b14ff16f145d82507e7acdd933d9bf068f3ef7.tar.gz
slackrepo_setup-f5b14ff16f145d82507e7acdd933d9bf068f3ef7.zip
sbshadow --no: leave the hints alone
A preview ran mkhint -F all the same, so an sbpull or sbshadow preview from sb-builder wrote hint files. --no now skips the sweep; --yes and the interactive run still do it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--AGENTS.md2
-rw-r--r--README.md4
-rwxr-xr-xsbshadow8
3 files changed, 9 insertions, 5 deletions
diff --git a/AGENTS.md b/AGENTS.md
index 874558d..113c169 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -80,7 +80,7 @@ Pipeline, in order:
package under `personal/` or `pentesting/` is `git rm`'d (shadow); any upstream package missing
from HEAD and no longer carried in an overlay is restored with `git checkout current -- cat/pkg`
(unshadow). A package is identified by a `$pkg/$pkg.SlackBuild` file. Match by directory
- basename only, not content. Then it always runs `mkhint -F`.
+ basename only, not content. Then it runs `mkhint -F`, except on `--no`.
`sbshadow` is also called by the `sbpull` bash function (`sbpull.bash`, sourced from root's `.bashrc` on the build VM) after a
`git subtree pull`, so overlay changes are applied without regenerating the whole repo. It is the
diff --git a/README.md b/README.md
index e462c7e..731fafd 100644
--- a/README.md
+++ b/README.md
@@ -22,8 +22,8 @@ upstream tree), so the overlay version wins.
carried in an overlay, and restores (unshadows) upstream packages no longer
carried, from the pristine `current` branch. Asks once before changing
anything, commits, then runs `mkhint -F` to regenerate phantom-dep hintfiles.
- `--yes` applies without asking, `--no` only shows the plan (for
- non-interactive callers such as sb-builder). `SBO_REPO` overrides the repo
+ `--yes` applies without asking, `--no` only shows the plan and skips
+ `mkhint -F` (for non-interactive callers such as sb-builder). `SBO_REPO` overrides the repo
path.
- `slackrepo_SBo-danix.conf`: the slackrepo config for this repo
(`/etc/slackrepo/`). Site values (rsync target, Gotify URL and key) are not
diff --git a/sbshadow b/sbshadow
index 25cf923..7d20edd 100755
--- a/sbshadow
+++ b/sbshadow
@@ -77,9 +77,13 @@ else
fi
# ── regenerate phantom-dep hintfiles (mkhint owns them) ───────────────────────
-# Always runs: a subtree pull can change REQUIRES even with nothing to shadow.
+# Runs even with nothing to shadow (a subtree pull can change REQUIRES), but
+# not on --no: a preview leaves the hints alone too.
# mkhint reads ~/.config/mkhint/phantom-deps; missing tool = harmless skip.
-if command -v mkhint >/dev/null 2>&1; then
+if [[ $answer == n ]]; then
+ echo
+ echo "sbshadow: preview, phantom-dep hintfiles not regenerated."
+elif command -v mkhint >/dev/null 2>&1; then
echo
echo "Regenerating phantom-dep hintfiles (mkhint -F)..."
mkhint -F