summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordd <dd@wx.tnyzeq.icu>2024-05-17 08:39:57 +0200
committerdd <dd@wx.tnyzeq.icu>2024-05-17 08:39:57 +0200
commitb9ad1c3db4e134d0d22c917e6613a8d246735c03 (patch)
treefaeebf69375aec63782668050768b4fdadd915a8
parent3e03f472de53f064f1d241dccd881546b2b59b9c (diff)
downloadvyos-build-b9ad1c3db4e134d0d22c917e6613a8d246735c03.tar.gz
vyos-build-b9ad1c3db4e134d0d22c917e6613a8d246735c03.zip
build-script: added workaround for .dsc in new format
-rw-r--r--vars/buildPackage.groovy16
1 files changed, 15 insertions, 1 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy
index aabaccf8..6edb6956 100644
--- a/vars/buildPackage.groovy
+++ b/vars/buildPackage.groovy
@@ -194,7 +194,21 @@ def call(description=null, pkgList=null, buildCmd=null, changesPattern="**") {
def PACKAGE = sh(returnStdout: true, script: "cat ${FILE} | grep Source ").trim().tokenize(' ').last()
sh(script: "scp ${SSH_OPTS} ${FILE} ${SSH_REMOTE}:${SSH_DIR}")
def FILENAME = FILE.toString().tokenize('/').last()
- sh(script: "ssh ${SSH_OPTS} ${SSH_REMOTE} -t \"uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} includedsc ${RELEASE} ${SSH_DIR}/${FILENAME}'\"")
+ def EXTRA_ARGS = ''
+ // Add generic Priority if missing
+ if (sh(returnStatus: true, script: "cat ${FILE} | grep Priority:") != 0) {
+ EXTRA_ARGS = EXTRA_ARGS + ' -P optional'
+ }
+ // Add generic Section if missing
+ if (sh(returnStatus: true, script: "cat ${FILE} | grep Priority:") != 0) {
+ EXTRA_ARGS = EXTRA_ARGS + ' -S misc'
+ }
+ // Ingore .dsc in git format
+ if (sh(returnStatus: true, script: "cat ${FILE} | grep Format: 3.0 (git)") != 0) {
+ echo "${FILE}: detected unsupported git format, skipping..."
+ return
+ }
+ sh(script: "ssh ${SSH_OPTS} ${SSH_REMOTE} -t \"uncron-add 'reprepro -v -b ${VYOS_REPO_PATH}${EXTRA_ARGS} includedsc ${RELEASE} ${SSH_DIR}/${FILENAME}'\"")
}
}