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
This commit is contained in:
classabbyamp 2023-07-08 15:34:58 -04:00 committed by classabbyamp
parent 0192981922
commit 95ed99c92d
2 changed files with 7 additions and 0 deletions

View File

@ -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.
<a id="patches"></a>
### Handling patches

View File

@ -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