[ARVADOS-DEV] updated: 4c0f702a2d5081d9622f9926f239552734edab91
Git user
git at public.arvados.org
Wed Dec 23 01:46:08 UTC 2020
Summary of changes:
jenkins/run_upload_packages.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
via 4c0f702a2d5081d9622f9926f239552734edab91 (commit)
from 85b3e1e4325290bcbe85cf196a17152702b0b8c1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 4c0f702a2d5081d9622f9926f239552734edab91
Author: Ward Vandewege <ward at curii.com>
Date: Tue Dec 22 20:45:43 2020 -0500
Do not try to add packages to the repository that are already in it.
refs #17218
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>
diff --git a/jenkins/run_upload_packages.py b/jenkins/run_upload_packages.py
index 41f0852..cc3217e 100755
--- a/jenkins/run_upload_packages.py
+++ b/jenkins/run_upload_packages.py
@@ -188,9 +188,17 @@ class DebianPackageSuite(DistroPackageSuite):
FREIGHT_SCRIPT = """
cd "$1"; shift
DISTNAME=$1; shift
-aptly repo add "$DISTNAME" "$@"
-aptly publish update "$DISTNAME" filesystem:"${DISTNAME%-*}":
-rm "$@"
+set +e
+aptly repo search "$DISTNAME" "${@%.deb}" >/dev/null 2>&1
+RET=$?
+set -e
+if [[ $RET -eq 0 ]]; then
+ echo "Not adding $@, it is already present in repo $DISTNAME"
+ rm "$@"
+else
+ aptly repo add -remove-files "$DISTNAME" "$@"
+ aptly publish update "$DISTNAME" filesystem:"${DISTNAME%-*}":
+fi
"""
def __init__(self, glob_root, rel_globs, target, ssh_host, ssh_opts, repo):
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list