From bbe2c9d4063a01f743572d47421f32c113ba1ebf Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Sat, 8 Jul 2023 15:34:58 -0400 Subject: [PATCH] common/xbps-src/shutils/update_check: add ability to disable update-check useful for cases where update checking does not make sense or is impossible --- Manual.md | 4 ++++ common/xbps-src/shutils/update_check.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Manual.md b/Manual.md index bbe6d869c6170e..0a68f088f6a25c 100644 --- a/Manual.md +++ b/Manual.md @@ -905,6 +905,10 @@ in url. Defaults to `(|v|$pkgname)[-_.]*`. part that follows numeric part of version directory in url. Defaults to `(|\.x)`. +- `disabled` can be set to disable update checking for the package, +in cases where checking for updates is impossible or does not make sense. +This should be set to a string describing why it is disabled. + ### Handling patches diff --git a/common/xbps-src/shutils/update_check.sh b/common/xbps-src/shutils/update_check.sh index e656cf06fbcc24..88276410057771 100644 --- a/common/xbps-src/shutils/update_check.sh +++ b/common/xbps-src/shutils/update_check.sh @@ -13,6 +13,9 @@ update_check() { if [ "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "using $XBPS_TARGET_PKG/update overrides" 1>&2 fi + if [ -n "$disabled" ]; then + echo "update-check DISABLED for $original_pkgname: $disabled" 1>&2 + fi elif [ -z "$distfiles" ]; then if [ "$XBPS_UPDATE_CHECK_VERBOSE" ]; then echo "NO DISTFILES found for $original_pkgname" 1>&2