[arvados-dev] created: e9615c3c0d8a4820f2dcd967a02e70a046a77182
git repository hosting
git at public.arvados.org
Fri Apr 26 20:48:18 UTC 2024
at e9615c3c0d8a4820f2dcd967a02e70a046a77182 (commit)
commit e9615c3c0d8a4820f2dcd967a02e70a046a77182
Author: Brett Smith <brett.smith at curii.com>
Date: Fri Apr 26 16:47:50 2024 -0400
21521: Wrap aptly commands in flock
See comments for rationale.
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/jenkins/run_upload_packages.py b/jenkins/run_upload_packages.py
index 3a51e40..216b56b 100755
--- a/jenkins/run_upload_packages.py
+++ b/jenkins/run_upload_packages.py
@@ -208,6 +208,12 @@ class DebianPackageSuite(DistroPackageSuite):
set -e
cd "$1"; shift
DISTNAME=$1; shift
+# aptly implements its own locking, but its wait strategy as of April 2024 is
+# not patient enough to accommodate multiple simultaneous uploads.
+APTLY_LOCK="${XDG_RUNTIME_DIR:-/tmp}/aptly-upload.lock"
+aptly() {
+ flock --wait=300 "$APTLY_LOCK" aptly "$@"
+}
for package in "$@"; do
if aptly repo search "$DISTNAME" "${package%.deb}" >/dev/null 2>&1; then
echo "Not adding $package, it is already present in repo $DISTNAME"
commit 23951312787e57b321028ff6a24c3d9cf52c7683
Author: Brett Smith <brett.smith at curii.com>
Date: Fri Apr 26 16:41:55 2024 -0400
21521: Make apt upload script less verbose
Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>
diff --git a/jenkins/run_upload_packages.py b/jenkins/run_upload_packages.py
index c6949e8..3a51e40 100755
--- a/jenkins/run_upload_packages.py
+++ b/jenkins/run_upload_packages.py
@@ -205,14 +205,11 @@ class DistroPackageSuite(PackageSuite):
class DebianPackageSuite(DistroPackageSuite):
APT_SCRIPT = """
+set -e
cd "$1"; shift
DISTNAME=$1; shift
for package in "$@"; do
- set +e
- aptly repo search "$DISTNAME" "${package%.deb}" >/dev/null 2>&1
- RET=$?
- set -e
- if [[ $RET -eq 0 ]]; then
+ if aptly repo search "$DISTNAME" "${package%.deb}" >/dev/null 2>&1; then
echo "Not adding $package, it is already present in repo $DISTNAME"
rm "$package"
else
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list