aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md12
-rw-r--r--CLAUDE.md14
-rwxr-xr-xmkhint4
-rw-r--r--mkhint.1.gzbin2824 -> 3397 bytes
-rw-r--r--mkhint.1.md31
5 files changed, 58 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e7278c2..c5a156f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,18 @@ All notable changes to this project are documented here. The format is based on
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
[Semantic Versioning](https://semver.org/).
+## [1.2.0] - 2026-07-07
+
+### Added
+- Manifest-driven bundled-dep updates. Packages listed in the new
+ `BUNDLE_MANIFEST_FILE` (`<pkg> <deps-url-template>`) have their extra
+ `DOWNLOAD` lines reconciled against an upstream deps manifest (e.g. neovim's
+ `cmake.deps/deps.txt`) during `--check`: matched lines are rewritten to the
+ manifest's pinned URLs and their checksums recomputed. `--new` reports the
+ reconcile without changing the hint.
+- `--force` flag (check-only): run the bundled-dep reconcile even when the
+ primary version is unchanged (e.g. to retry after a failed manifest fetch).
+
## [1.1.3] - 2026-07-07
### Fixed
diff --git a/CLAUDE.md b/CLAUDE.md
index 36f782d..c245686 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -19,7 +19,7 @@ HINT_DIR="/etc/slackrepo/SBo-danix/hintfiles/" # where .hint files live
Both `mkhint` and the bash completion script now source `~/.config/mkhint/config`, so their path constants no longer drift.
-An optional sourced config file `~/.config/mkhint/config` (plain bash `KEY="value"`) is read right after the baked-in defaults, overriding any of: `REPO_DIR`, `HINT_DIR`, `PACKAGES_DIR` (default `/repo/`, the built-package repository holding `*.txz` files), `NVCHECKER_CONFIG`, `PHANTOM_DEPS_FILE`, `TMP_DIR`. A missing file leaves the previous defaults in place. Loaded via `MKHINT_CONFIG` / `[[ -f "$MKHINT_CONFIG" ]] && source`; the completion script sources the same file so the two stay in sync.
+An optional sourced config file `~/.config/mkhint/config` (plain bash `KEY="value"`) is read right after the baked-in defaults, overriding any of: `REPO_DIR`, `HINT_DIR`, `PACKAGES_DIR` (default `/repo/`, the built-package repository holding `*.txz` files), `NVCHECKER_CONFIG`, `PHANTOM_DEPS_FILE`, `BUNDLE_MANIFEST_FILE`, `TMP_DIR`. A missing file leaves the previous defaults in place. Loaded via `MKHINT_CONFIG` / `[[ -f "$MKHINT_CONFIG" ]] && source`; the completion script sources the same file so the two stay in sync.
nvchecker config path is read from `$HOME/.config/nvchecker/nvchecker.toml` (not hardcoded):
@@ -150,6 +150,18 @@ When adding new features, add a corresponding test case to `tests/mkhint_test.sh
- `--no-dl` / `-N`: downloads and recalculates checksums as normal, then appends `NODOWNLOAD=yes` after `MD5SUM_x86_64=`. Works with `--hintfile` or `--new`. Error if used alone.
- `--fix-current` / `-F`: bulk sweep. Loads `PHANTOM_DEPS_FILE`, scans every `.info` in `REPO_DIR`, and for each package whose REQUIRES contains a phantom dep, ensures its hint carries the matching `DELREQUIRES`. No existing hint → create a minimal `DELREQUIRES="..."` file. Existing hint → back up to `.bak` and union the phantom deps into its `DELREQUIRES` line (dedup), leaving all other content untouched. Idempotent: if the deps are already present, the file is left alone and no `.bak` is written. No per-package prompts, safe under `set -e`. Mutually exclusive with `-V`/`-f`/`-n` (exit 1). Empty/missing list → "Nothing to do", exit 0. Helpers: `load_phantom_deps`, `phantom_deps_in_info`, `merge_delrequires`, `fix_current`.
- `--new` phantom-dep hook: after commenting out REQUIRES, `create_new_hint_file` appends `DELREQUIRES="..."` for any phantom dep found in the `.info` REQUIRES. Same list as `--fix-current`.
+- `--check` bundled-dep reconcile: for packages listed in `BUNDLE_MANIFEST_FILE`
+ (`<pkg> <url-template-with-{VERSION}>`), after the primary bump mkhint fetches
+ the upstream deps manifest (`NAME_URL`/`NAME_SHA256` pairs, e.g. neovim's
+ `cmake.deps/deps.txt`), matches each extra `DOWNLOAD` line via
+ `match_dep_url` (repo-path first, exact basename-stem fallback for blob
+ hosts), and rewrites changed lines + recomputes their md5. Runs
+ automatically when the primary changed this run, otherwise only with
+ `--force` (check-only flag). `--new` on a listed package prints the reconcile
+ report without changing the hint. Manifest deps with no hint line are listed
+ as an FYI, never added (would need a SlackBuild change). Helpers:
+ `load_bundle_manifests`, `manifest_url_for`, `fetch_manifest`,
+ `parse_manifest`, `match_dep_url`, `reconcile_bundle_deps`.
- `--delete` / `-d`: removes hint file and `.bak` if present. Accepts multiple package names. Exits 2 on first missing file.
- Downloads go to `/tmp/mkhint/download` (single shared temp file, deleted after md5 calculation).
- Multiline `DOWNLOAD`/`DOWNLOAD_x86_64`: parsed via `parse_multiline_var` (awk). First URL always re-downloaded. Continuation URLs (2+) prompt user interactively — changed URLs re-downloaded, unchanged URLs keep existing md5. Written back via `perl -i` with `\` continuation format preserved. Shared logic in `update_checksums` → `_process_download_var`.
diff --git a/mkhint b/mkhint
index f1e9131..1e171d9 100755
--- a/mkhint
+++ b/mkhint
@@ -45,7 +45,7 @@ if [[ ! -d $TMP_DIR ]]; then
mkdir $TMP_DIR
fi
-readonly MKHINT_VERSION="1.1.3"
+readonly MKHINT_VERSION="1.2.0"
# Variables
VERSION=""
@@ -80,12 +80,14 @@ Options:
--fix-current, -F Add/merge DELREQUIRES for -current phantom deps across the whole repo
--delete, -d FILE Delete a hint file (and .bak if present)
--no-dl, -N Skip downloads; add NODOWNLOAD=yes to hint file (use with -f or -n)
+ --force With --check: reconcile bundled deps even if the primary version is unchanged
--help, -h Show this help message
Config file: ${MKHINT_CONFIG}$([[ -f "$MKHINT_CONFIG" ]] && echo " (present, sourced)" || echo " (not present, using defaults)")
Hint files are stored in: $HINT_DIR
Temporary files are stored in: $TMP_DIR
Phantom-dep list (for --fix-current / --new): $PHANTOM_DEPS_FILE
+Bundle manifests (for --check bundled-dep reconcile): $BUNDLE_MANIFEST_FILE
See 'man mkhint' for usage examples, configuration, and exit codes.
EOF
diff --git a/mkhint.1.gz b/mkhint.1.gz
index 3a40666..fba1bec 100644
--- a/mkhint.1.gz
+++ b/mkhint.1.gz
Binary files differ
diff --git a/mkhint.1.md b/mkhint.1.md
index af22096..d9d751f 100644
--- a/mkhint.1.md
+++ b/mkhint.1.md
@@ -1,4 +1,4 @@
-% MKHINT(1) mkhint 1.1.3 | User Commands
+% MKHINT(1) mkhint 1.2.0 | User Commands
% Danilo M.
% July 2026
@@ -87,6 +87,11 @@ show a diff and prompt **[K]eep / [D]elete / [S]kip**.
: Download and recalculate checksums, then append `NODOWNLOAD=yes`. Use with
**\--hintfile** or **\--new**; an error on its own.
+**\--force**
+: Only meaningful with **\--check**. Reconcile a bundle package's extra download
+lines against its upstream manifest even when the primary version has not
+changed. Use to retry after a previous manifest fetch failed.
+
**\--version**, **-v**
: Print `mkhint <version>` and exit.
@@ -163,6 +168,10 @@ and the **\--new** phantom-dep hook no-ops.
`TMP_DIR` (`/tmp/mkhint`)
: Scratch directory for downloads.
+`BUNDLE_MANIFEST_FILE` (`$HOME/.config/mkhint/bundle-manifests`)
+: Packages whose extra download lines are reconciled against an upstream deps
+manifest during **\--check**. See BUNDLED DEPENDENCIES.
+
# FILES
*~/.config/mkhint/config*
@@ -171,6 +180,9 @@ and the **\--new** phantom-dep hook no-ops.
*~/.config/mkhint/phantom-deps*
: Phantom dependency list.
+*~/.config/mkhint/bundle-manifests*
+: Bundle manifest list.
+
*~/.config/nvchecker/nvchecker.toml*
: nvchecker configuration.
@@ -201,6 +213,23 @@ respective directories. With **-f** *package* already on the command line,
completion script sources the same *~/.config/mkhint/config*, so its paths stay
in sync with **mkhint**.
+# BUNDLED DEPENDENCIES
+
+Some SlackBuilds bundle several tarballs in one DOWNLOAD line: a primary source
+plus pinned dependencies (neovim is the canonical case). Such packages can be
+listed in the file named by BUNDLE_MANIFEST_FILE
+(default \~/.config/mkhint/bundle-manifests), one entry per line:
+
+ neovim https://raw.githubusercontent.com/neovim/neovim/v{VERSION}/cmake.deps/deps.txt
+
+The URL is an upstream, machine-readable deps manifest (NAME_URL / NAME_SHA256
+pairs); {VERSION} is substituted with the hint's version. For a listed package,
+\--new prints a reconcile report (no changes), and \--check reconciles the extra
+download lines against the manifest after the primary bump, rewriting changed
+lines and recomputing their checksums. Bundled deps are never followed to their
+own latest release; only the manifest's pinned URLs are used. Manifest entries
+with no matching download line are reported but not added.
+
# SEE ALSO
**slackrepo**(8), **nvchecker**(1), **nvtake**(1)