[PATCH] Future-proof ddeb handling against buildd changes

Colin Watson cjwatson at ubuntu.com
Tue Feb 2 23:27:40 UTC 2010

At some point, Launchpad will gain the ability to process ddebs.  When
that happens, we'll add a flag to the /CurrentlyBuilding file on the
buildds.  It'd be nice to ensure in advance that the kernel packaging
can handle this, as pkg_create_dbgsym already does.

diff --git a/debian.master/rules.d/2-binary-arch.mk b/debian.master/rules.d/2-binary-arch.mk
index 4468d25..b927374 100644
--- a/debian.master/rules.d/2-binary-arch.mk
+++ b/debian.master/rules.d/2-binary-arch.mk
@@ -287,8 +287,13 @@ ifneq ($(skipdbg),true)
 	mv ../$(dbgpkg)_$(release)-$(revision)_$(arch).deb \
-	grep -v '^$(dbgpkg)_.*$$' debian/files > debian/files.new
-	mv debian/files.new debian/files
+	set -e; \
+	if grep -qs '^Build-Debug-Symbols: yes$$' /CurrentlyBuilding; then \
+		sed -i '/^$(dbgpkg)_/s/\.deb /.ddeb /' debian/files; \
+	else \
+		grep -v '^$(dbgpkg)_.*$$' debian/files > debian/files.new; \
+		mv debian/files.new debian/files; \
+	fi
 	# Now, the package wont get into the archive, but it will get put
 	# into the debug system.


Colin Watson                                       [cjwatson at ubuntu.com]

More information about the kernel-team mailing list