fix(main/vim,x11/vim-gtk): ensure base 10 handling of patch versions

%ci:no-build
This commit is contained in:
termux-pacman-bot
2026-02-19 00:48:07 +00:00
parent dc4011d333
commit e7057d3b68
2 changed files with 14 additions and 6 deletions

View File

@@ -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() {

View File

@@ -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() {