From 4840c4f8a744ad6a7d296ecf87b84a10b8f4ce0c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 7 Jul 2026 10:49:22 +0200 Subject: fix: bump dash-form dated URLs on version change --hintfile -V and --new -V only substituted the packaged underscore form of the old version, so download URLs using the upstream dash form (dates like 2026-07-07, tags) kept pointing at the old tarball and their md5 went stale. Now both the underscore and dash variants of old->new are rewritten. exploitdb was the trigger case. Tests T74 (--hintfile) and T75 (--new) cover the dashed-URL bump. Release v1.1.3. Co-Authored-By: Claude Opus 4.8 --- mkhint | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mkhint') diff --git a/mkhint b/mkhint index 80cd029..b0a7705 100755 --- a/mkhint +++ b/mkhint @@ -39,7 +39,7 @@ if [[ ! -d $TMP_DIR ]]; then mkdir $TMP_DIR fi -readonly MKHINT_VERSION="1.1.2" +readonly MKHINT_VERSION="1.1.3" # Variables VERSION="" @@ -463,7 +463,11 @@ create_new_hint_file() { if [[ -n "$VERSION" ]]; then local old_version old_version=$(grep '^VERSION=' "$normalized_file" | sed 's/VERSION="//;s/"$//') + # bump both '_' and '-' variants (see update_hint_file note) sed -i "s/${old_version}/${VERSION}/g" "$normalized_file" + if [[ "$old_version" == *_* || "$VERSION" == *_* ]]; then + sed -i "s/${old_version//_/-}/${VERSION//_/-}/g" "$normalized_file" + fi update_checksums "$normalized_file" fi @@ -792,8 +796,14 @@ update_hint_file() { # Extract current version from hint file old_version=$(grep '^VERSION=' "$normalized_file" | sed 's/VERSION="//;s/"$//') - # Use sed for global replacement of OLD_VERSION in all variables + # Use sed for global replacement of OLD_VERSION in all variables. + # SlackBuild VERSION uses '_' but download URLs often carry the upstream + # '-' form (dates like 2026-07-07, tags), so bump both variants — otherwise + # a dated URL keeps pointing at the old tarball and its md5 goes stale. sed -i "s/${old_version}/${new_version}/g" "$normalized_file" + if [[ "$old_version" == *_* || "$new_version" == *_* ]]; then + sed -i "s/${old_version//_/-}/${new_version//_/-}/g" "$normalized_file" + fi update_checksums "$normalized_file" -- cgit v1.2.3