Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/version/check.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-08-16 08:06:08 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-08-16 08:06:08 +0200
commitdeffc1b87e86fffa8e4758a76a1912c6c8f69a85 (patch)
tree0f61a152c4c49d40de5042df2b25cdb8e0b0a82d /src/lib/version/check.sh
parent2994bca96781afd62104c1515532a9c479cb5bed (diff)
parent27eebe383d0b571c08cba991e4824768d7623602 (diff)
merged with upstreamHEADmaster
Diffstat (limited to 'src/lib/version/check.sh')
-rw-r--r--src/lib/version/check.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/version/check.sh b/src/lib/version/check.sh
index ec90eb4..4a2b5fa 100644
--- a/src/lib/version/check.sh
+++ b/src/lib/version/check.sh
@@ -114,10 +114,6 @@ pkgctl_version_check() {
fi
pushd "${path}" >/dev/null
- if [[ ! -f "PKGBUILD" ]]; then
- die "No PKGBUILD found for ${path}"
- fi
-
# update the current terminal spinner status
(( ++current_item ))
pkgctl_version_check_spinner \
@@ -128,6 +124,13 @@ pkgctl_version_check() {
"${current_item}" \
"${#pkgbases[@]}"
+ if [[ ! -f "PKGBUILD" ]]; then
+ result="${BOLD}${path}${ALL_OFF}: no PKGBUILD found"
+ failure+=("${result}")
+ popd >/dev/null
+ continue
+ fi
+
# reset common PKGBUILD variables
unset pkgbase pkgname arch source pkgver pkgrel validpgpkeys
# shellcheck source=contrib/makepkg/PKGBUILD.proto
@@ -224,7 +227,7 @@ get_upstream_version() {
fi
if ! output=$(GIT_TERMINAL_PROMPT=0 nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \
- jq --raw-output 'select(.level != "debug")'); then
+ jq --raw-output 'select((.level != "debug") and (.event != "ignoring invalid version"))'); then
printf "failed to run nvchecker: %s" "${output}"
return 1
fi
@@ -264,13 +267,13 @@ nvchecker_check_config() {
done
# check if the config contains a pkgbase section
- if [[ -n ${pkgbase} ]] && ! grep --max-count=1 --extended-regexp --quiet "^\\[\"?${pkgbase}\"?\\]" < "${config}"; then
+ if [[ -n ${pkgbase} ]] && ! grep --max-count=1 --extended-regexp --quiet "^\\[\"?${pkgbase//+/\\+}\"?\\]" < "${config}"; then
printf "missing pkgbase section in %s: %s" "${config}" "${pkgbase}"
return 1
fi
# check if the config contains any section other than pkgbase
- if [[ -n ${pkgbase} ]] && property=$(grep --max-count=1 --perl-regexp "^\\[(?!\"?${pkgbase}\"?\\]).+\\]" < "${config}"); then
+ if [[ -n ${pkgbase} ]] && property=$(grep --max-count=1 --perl-regexp "^\\[(?!\"?${pkgbase//+/\\+}\"?\\]).+\\]" < "${config}"); then
printf "non-pkgbase section not supported in %s: %s" "${config}" "${property}"
return 1
fi