[trusty/lts-backport-utopic-next 3/3] UBUNTU: [Debian] rebuild should only trigger for non-linux packages
Andy Whitcroft
apw at canonical.com
Mon Nov 16 17:47:24 UTC 2015
BugLink: http://bugs.launchpad.net/bugs/1498862
BugLink: http://bugs.launchpad.net/bugs/1516686
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
debian/tests/rebuild | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/debian/tests/rebuild b/debian/tests/rebuild
index 8a99850..6f73b36c 100644
--- a/debian/tests/rebuild
+++ b/debian/tests/rebuild
@@ -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
--
2.6.2
More information about the kernel-team
mailing list