From bb24e7ab9ef4a1a97e00575f8c13497ec6a3e32d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 25 Sep 2026 11:56:29 +0200 Subject: fix: bump dotless build number in download URLs Some upstreams name tarballs by a dotless build number while the SlackBuild VERSION is dotted (sublime_text: VERSION 4.2.00, URL build_4200), so the version swap missed the URL and the md5 was recomputed for the old tarball. Also swap the dotless form, only inside URLs and only as a whole number, leaving md5 hex alone. Co-Authored-By: Claude Opus 5.5 --- mkhint | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mkhint') diff --git a/mkhint b/mkhint index 038d4a6..008eeaf 100755 --- a/mkhint +++ b/mkhint @@ -1050,6 +1050,7 @@ create_new_hint_file() { if [[ "$old_version" == *_* || "$VERSION" == *_* ]]; then sed -i "s/${old_version//_/-}/${VERSION//_/-}/g" "$normalized_file" fi + _swap_dotless_url_version "$old_version" "$VERSION" "$normalized_file" update_checksums "$normalized_file" fi @@ -1696,6 +1697,17 @@ _process_download_var() { } # Update existing hint file +# Some upstreams name tarballs by a dotless build number while the SlackBuild +# VERSION is dotted (sublime_text: VERSION 4.2.00, URL build_4200), so the +# plain swap misses the URL and the md5 is recomputed for the old tarball. +# Also bump the dotless form, only inside URLs and only as a whole number, +# so md5 hex and unrelated digits are left alone. +_swap_dotless_url_version() { + local old="${1//./}" new="${2//./}" file="$3" + [[ "$1" == *.* && "$old" != "$new" ]] || return 0 + O="$old" N="$new" perl -pi -e 's{(://[^\s"]*?)(?