From 41c7bf5f14dab7f763c4c5498c0bfec8312a2ac8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 10 Jul 2026 11:52:00 +0200 Subject: 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 --- tests/mkhint_test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/mkhint_test.sh') 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" -- cgit v1.2.3