path: root/rpb-kernel-latest.yaml
diff options
authorRiku Voipio <riku.voipio@linaro.org>2017-11-16 15:01:59 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2017-11-16 13:26:12 +0000
commit62a8ac5aeec3b9987409883659ae66da5441a2ff (patch)
tree984421fff2e8bdfaa732d30a29f511f59afe4a11 /rpb-kernel-latest.yaml
parent6505ee8cf7749627aa88da2bbbb2f7b171aac6cb (diff)
rpb-kernel-latest: automate update
Trigger metapackage updates automatically for each new kernel. We can't trigger directly from the kernel package job, as we need to wait for a binary build to appear in the target repo. Use the exitisting trigger-rpb-debian-installer-staging since it's already polling the correct repository. Change-Id: I54ce06fc92de8e2564a3e7c9ec030adfc2e1c99c
Diffstat (limited to 'rpb-kernel-latest.yaml')
1 files changed, 7 insertions, 1 deletions
diff --git a/rpb-kernel-latest.yaml b/rpb-kernel-latest.yaml
index 8df66e299..3bce0c1e3 100644
--- a/rpb-kernel-latest.yaml
+++ b/rpb-kernel-latest.yaml
@@ -39,7 +39,13 @@
echo deb-src http://obs.linaro.org/${TR}/${OBS_RELEASE}/ ./ | sudo tee -a /etc/apt/sources.list.d/${TARGET_REPO}.list
sudo apt-get update -q=2
- kernel_abi_version=$(apt-cache search linux-support|sed -e 's,-rc,~rc,' -e 's, .*,,' -e 's,linux-support-,,'|sort --version-sort|tail -1|sed -e 's,~rc,-rc,')
+ kernel_abi_version=$(apt-cache search ^linux-support|sed -e 's,-rc,~rc,' -e 's, .*,,' -e 's,linux-support-,,'|sort --version-sort|tail -1|sed -e 's,~rc,-rc,')
+ old_kernel_abi_version=$(apt-cache show linux-image-reference-arm64|grep Depends:|sed -e 's,-rc,~rc,' -e 's,.*linux-image-,,' -e 's,-arm64$,,'|sort --version-sort|tail -1|sed -e 's,~rc,-rc,' )
+ if [ ${old_kernel_abi_version} == ${kernel_abi_version} ]; then
+ echo metapackage up to date at ${old_kernel_abi_version}
+ exit 0
+ fi
package_version=$(apt-cache showsrc linux-reference-source|awk '/^Version/ { print ($2)+1 }')
sudo apt-get install -y linux-support-${kernel_abi_version}