]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: [Debian] rebuild should only trigger for non-linux packages
authorAndy Whitcroft <apw@canonical.com>
Wed, 23 Sep 2015 10:54:24 +0000 (11:54 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 20 Feb 2017 03:57:58 +0000 (20:57 -0700)
BugLink: http://bugs.launchpad.net/bugs/1498862
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
debian/tests/rebuild

index 8a9985002e784b2a0b7aaa9373a36ac2599a2fdd..6f73b36c1b5edb52af690243780e6c839f9ec1ba 100644 (file)
@@ -1,3 +1,20 @@
 #!/bin/sh
+
+# If we are triggering for just linux or linux-meta we know we have
+# just built the kernel and there is no point in repeating that
+# build, it just wastes time.  (LP: #1498862)
+build_needed=0
+for trigger in ${ADT_TEST_TRIGGERS:-force}
+do
+       case "$trigger" in
+       linux/*|linux-lts-*/*|linux-meta*/*)            ;;
+       *)                                              build_needed=1 ;;
+       esac
+done
+if [ "$build_needed" -eq 0 ]; then
+       echo "rebuild: short circuiting build for '${ADT_TEST_TRIGGERS}'"
+       exit 0
+fi
+
 set -e
 dpkg-buildpackage -rfakeroot -us -uc -b