From e7057d3b68554ffba98cc7a3b2f4240dba83c010 Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Thu, 19 Feb 2026 00:48:07 +0000 Subject: [PATCH] fix(main/vim,x11/vim-gtk): ensure base 10 handling of patch versions %ci:no-build --- packages/vim/build.sh | 10 +++++++--- x11-packages/vim-gtk/build.sh | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/packages/vim/build.sh b/packages/vim/build.sh index 5f064f2022..a44538c88c 100644 --- a/packages/vim/build.sh +++ b/packages/vim/build.sh @@ -55,8 +55,11 @@ termux_pkg_auto_update() { # remember to apply that change to the other as well. local latest_tag current_patch latest_patch latest_tag="$(termux_github_api_get_tag)" - latest_patch="${latest_tag##*.}" - current_patch="${TERMUX_PKG_VERSION##*.}" + # Specify Base 10 with the `10#` prefix. + # This is necessary to suppress automatic interpretation + # of the value as octal when there is a leading 0. + latest_patch="10#${latest_tag##*.}" + current_patch="10#${TERMUX_PKG_VERSION##*.}" # Vim releases nearly every commit as a new tag. # To avoid auto update spam, we only update Vim every 50th patch. @@ -69,7 +72,8 @@ termux_pkg_auto_update() { return fi - termux_pkg_upgrade_version "${latest_tag%.*}.${latest_patch}" + # Pad the patch component of the version back to 4 digits in accordance with Vim's tag naming. + termux_pkg_upgrade_version "$(printf '%s.%04d' "${latest_tag%.*}" "${latest_patch}")" } termux_step_pre_configure() { diff --git a/x11-packages/vim-gtk/build.sh b/x11-packages/vim-gtk/build.sh index 7f2d7beda0..4ed8abfe9d 100644 --- a/x11-packages/vim-gtk/build.sh +++ b/x11-packages/vim-gtk/build.sh @@ -55,8 +55,11 @@ termux_pkg_auto_update() { # remember to apply that change to the other as well. local latest_tag current_patch latest_patch latest_tag="$(termux_github_api_get_tag)" - latest_patch="${latest_tag##*.}" - current_patch="${TERMUX_PKG_VERSION##*.}" + # Specify Base 10 with the `10#` prefix. + # This is necessary to suppress automatic interpretation + # of the value as octal when there is a leading 0. + latest_patch="10#${latest_tag##*.}" + current_patch="10#${TERMUX_PKG_VERSION##*.}" # Vim releases nearly every commit as a new tag. # To avoid auto update spam, we only update Vim every 50th patch. @@ -69,7 +72,8 @@ termux_pkg_auto_update() { return fi - termux_pkg_upgrade_version "${latest_tag%.*}.${latest_patch}" + # Pad the patch component of the version back to 4 digits in accordance with Vim's tag naming. + termux_pkg_upgrade_version "$(printf '%s.%04d' "${latest_tag%.*}" "${latest_patch}")" } termux_step_pre_configure() {