Patchwork Future-proof ddeb handling against buildd changes

login
register
mail settings
Submitter Colin Watson
Date Feb. 2, 2010, 11:27 p.m.
Message ID <20100202232739.GS4409@riva.ucam.org>
Download mbox | patch
Permalink /patch/44325/
State Accepted
Delegated to: Andy Whitcroft
Headers show

Comments

Colin Watson - Feb. 2, 2010, 11:27 p.m.
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,
Martin Pitt - Feb. 2, 2010, 11:57 p.m.
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.
Applied to Lucid.

-apw
Stefan Bader - Feb. 8, 2010, 4:28 p.m.
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.
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.
Jaunty, Intrepid, Hardy and Dapper to go...

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