Fix silent notifications and stop stale checkouts queueing rebuild loops
Two failures from the first live run: notify_basecamp declared 'local BASECAMP_CHATBOT_URL' and then called release_chatbot_url, whose fallback reads that same global — bash locals are visible to called functions, so the fallback saw the empty local and every notification silently went nowhere for anyone with only the legacy variable set. The local is now named 'url'. check-versions compared PKGBUILD and published versions with !=, so a checkout BEHIND the channel queued a rebuild of an older version every cycle: the builder produced it and promotion refused it, because that exact filename is already published with different bytes. It now skips (with a warning naming the package) when an artifact for the PKGBUILD's version already exists in the channel, whichever direction the versions differ.
This commit is contained in:
1 parent
0eb592b624
commit
7c3cfc50e9
2 files changed
+19
-4
No files matched your search
@@ -131,6 +131,17 @@ check_package() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Different is not the same as newer. A checkout behind the published state
|
||||
# — a stale branch, an un-pulled host — otherwise queues a REBUILD OF AN
|
||||
# OLDER VERSION every cycle: the builder produces it, and promotion refuses
|
||||
# it because that exact filename is already published with different bytes.
|
||||
# If the artifact for this version already exists in the channel, there is
|
||||
# nothing to build regardless of which direction the versions differ.
|
||||
if compgen -G "$REPO_ROOT/$mirror/$ARCH/${pkg}-${pkgbuild_version}-*.pkg.tar."[!s]* >/dev/null 2>&1; then
|
||||
print_warning "$pkg $pkgbuild_version is already published — this checkout is behind the channel; not queueing"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user