diff options
author | Daniil Baturin <daniil@vyos.io> | 2021-02-24 13:41:44 +0200 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2021-02-24 13:41:44 +0200 |
commit | db912d994762bd72e80b64c16dc7c831a9a673a4 (patch) | |
tree | a08ee39fc492f430d4537c4b17129c0f7b6b3d07 | |
parent | 2845f61a59d0a44321aecf51d84adea2839f4921 (diff) | |
download | vyos-build-db912d994762bd72e80b64c16dc7c831a9a673a4.tar.gz vyos-build-db912d994762bd72e80b64c16dc7c831a9a673a4.zip |
Correctly detect package architecture.
-rw-r--r-- | vars/buildPackage.groovy | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vars/buildPackage.groovy b/vars/buildPackage.groovy index 262f518e..0d0ec3a7 100644 --- a/vars/buildPackage.groovy +++ b/vars/buildPackage.groovy @@ -167,9 +167,12 @@ def call(description=null, pkgList=null, buildCmd=null) { def SSH_REMOTE = env.DEV_PACKAGES_VYOS_NET_HOST // defined as global variable def SSH_DIR = '~/VyOS/' + RELEASE + '/' + env.DEBIAN_ARCH - def ARCH_OPT = '' - if (env.DEBIAN_ARCH != 'all') - ARCH_OPT = '-A ' + env.DEBIAN_ARCH + + def PACKAGE = sh(returnStdout: true, script: "dpkg-deb -f ${FILE} Package").trim() + def PACKAGE_ARCH = sh(returnStdout: true, script: "dpkg-deb -f ${FILE} Architecture").trim() + def ARCH = '' + if (PACKAGE_ARCH != 'all') + ARCH = '-A ' + PACKAGE_ARCH files = findFiles(glob: '*.deb') if (files) { @@ -181,9 +184,9 @@ def call(description=null, pkgList=null, buildCmd=null) { sh """ ssh ${SSH_OPTS} ${SSH_REMOTE} -t "bash --login -c 'mkdir -p ${SSH_DIR}'" scp ${SSH_OPTS} ${FILE} ${SSH_REMOTE}:${SSH_DIR}/ - ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH_OPT} remove ${RELEASE} ${PKG}'" + ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH} remove ${RELEASE} ${PKG}'" ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} deleteunreferenced'" - ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH_OPT} includedeb ${RELEASE} ${SSH_DIR}/${FILE}'" + ssh ${SSH_OPTS} ${SSH_REMOTE} -t "uncron-add 'reprepro -v -b ${VYOS_REPO_PATH} ${ARCH} includedeb ${RELEASE} ${SSH_DIR}/${FILE}'" """ } } |