diff mbox

Future-proof ddeb handling against buildd changes

Message ID 20100202232739.GS4409@riva.ucam.org
State Accepted
Delegated to: Andy Whitcroft
Headers show

Commit Message

Colin Watson Feb. 2, 2010, 11:27 p.m. UTC
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.


Thanks,

Comments

Martin Pitt Feb. 2, 2010, 11:57 p.m. UTC | #1
Colin Watson [2010-02-02 23:27 +0000]:
> -	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

This looks correct to me, thanks Colin!

Martin
Andy Whitcroft Feb. 5, 2010, 1:27 a.m. UTC | #2
Applied to Lucid.

-apw
Stefan Bader Feb. 8, 2010, 4:28 p.m. UTC | #3
Colin Watson wrote:
> 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.

Colin,

I wonder whether we/I should add the same or similar magic to the older kernel
packages as well.

-Stefan

> 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 \
>  		../$(dbgpkg)_$(release)-$(revision)_$(arch).ddeb
> -	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.
>  endif
> 
> Thanks,
>
Colin Watson Feb. 9, 2010, 11:31 a.m. UTC | #4
On Mon, Feb 08, 2010 at 05:28:08PM +0100, Stefan Bader wrote:
> Colin Watson wrote:
> > 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.
> 
> I wonder whether we/I should add the same or similar magic to the older kernel
> packages as well.

I think that would be a good idea, at your leisure.
Stefan Bader Feb. 10, 2010, 4:22 p.m. UTC | #5
Jaunty, Intrepid, Hardy and Dapper to go...
diff mbox

Patch

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 \
 		../$(dbgpkg)_$(release)-$(revision)_$(arch).ddeb
-	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.
 endif