diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-10 11:52:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-10 11:52:00 +0200 |
| commit | 41c7bf5f14dab7f763c4c5498c0bfec8312a2ac8 (patch) | |
| tree | bde68f56333ec1754a3cccc8b7a2c31204474971 /tests/mkhint_test.sh | |
| parent | f60659bf44bf970af3dfc200135bc6b98413e16b (diff) | |
| download | mkhintfile-41c7bf5f14dab7f763c4c5498c0bfec8312a2ac8.tar.gz mkhintfile-41c7bf5f14dab7f763c4c5498c0bfec8312a2ac8.zip | |
fix: defer nvtake to slackrepo confirm
nvchecker's oldver is now synced (nvtake) only when the slackrepo prompt
is confirmed, per package, just before slackrepo runs. Moved out of the
hint-rewrite step in --check and the version-accept step in --hintfile
(both now route through run_slackrepo). Confirming slackrepo acknowledges
the versions; a stopped/failed slackrepo can be rerun without nvchecker
re-reporting already-committed versions.
Fixes the stuck state where interrupting a run between hint-rewrite and
slackrepo left oldver behind the hint, so nvchecker logged a phantom
'updated' line every subsequent --check.
Tests T20/T23 answer Y to slackrepo so nvtake fires. Dead
check_nvchecker_take flag removed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'tests/mkhint_test.sh')
| -rwxr-xr-x | tests/mkhint_test.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index 90f6705..b30273e 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -707,8 +707,8 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" EOF rm -f "$MOCK_BASE/nvtake.log" -# blank = accept latest (8.9.0 from keyfile); n = skip slackrepo -run_mkhint -f curl < <(printf '\nn\n') +# blank = accept latest (8.9.0 from keyfile); Y = run slackrepo (nvtake fires on confirm) +run_mkhint -f curl < <(printf '\nY\n') assert_contains "VERSION set to latest" "$MOCK_HINT/curl.hint" 'VERSION="8.9.0"' assert_contains "URL has latest version" "$MOCK_HINT/curl.hint" 'curl-8.9.0' assert_file_exists "nvtake was called" "$MOCK_BASE/nvtake.log" @@ -762,7 +762,8 @@ MD5SUM_x86_64="" EOF rm -f "$MOCK_HINT/clion.hint" "$MOCK_HINT/protoc-gen-go-grpc.hint" "$MOCK_HINT"/*.bak 2>/dev/null rm -f "$MOCK_BASE/nvtake.log" -run_mkhint -C curl < <(printf 'Y\nn\n') +# Y = confirm update; Y = run slackrepo (nvtake fires on slackrepo confirm) +run_mkhint -C curl < <(printf 'Y\nY\n') assert_contains "curl updated to 8.9.0" "$MOCK_HINT/curl.hint" 'VERSION="8.9.0"' assert_file_exists "nvtake called" "$MOCK_BASE/nvtake.log" |
