[Karmic] SRU: Fix virtual package build on i386

Andy Whitcroft apw at canonical.com
Sat Oct 31 12:35:48 UTC 2009


On Sat, Oct 31, 2009 at 11:38:49AM +0000, Stefan Bader wrote:
> SRU Justification:
> 
> Impact: Running the kernel build from within debuild (which is done by
> the buildds) seems to imply the -e shell option being set. This in
> turn causes the copy loop, which takes modules from one main flavour
> to the subflavour, to exit on the first wildcard rule which fails to
> find any files. This is the case as with the "drivers/xen/*" line.
> Everything after that is not going into the package.
> 
> Fix: Prevent the find command in the script from being a failure point.
> If no files are found, just continue.
> [The patch also fixes a small issue on printing the copied modules to
> stdout. Before only the main module was printed multiple times, if there
> were depending modules. Now the real module name is printed]
> 
> Testcase: Run "debuild -B" for the i386 architecture. Without this
> patch, there are quite a lot modules missing. (Tested in PPA)

It also cleans up some spurious error messages in the output (which is
good).  Looks good to me, and the PPA packages look a lot bigger.

Acked-by: Andy Whitcroft <apw at canonical.com>

> From ddcb071a37a446cb6ae62e4c6324daf55629c140 Mon Sep 17 00:00:00 2001
> From: Stefan Bader <stefan.bader at canonical.com>
> Date: Fri, 30 Oct 2009 17:26:27 +0000
> Subject: [PATCH] UBUNTU: SAUCE: Fix sub-flavour script to not stop on missing directories
> 
> BugLink: http://bugs.launchpad.net/bugs/453073
> 
> The way the builders run the sub-flavour script seems to include setting
> an option to exit loops when an error occurs within that loop. This will
> happen when a wildcard entry is not found. Fix this by catching the
> error condition and while being on it also fix the name printed on
> install.
> 
> Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
> ---
>  debian.master/scripts/sub-flavour |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/debian.master/scripts/sub-flavour b/debian.master/scripts/sub-flavour
> index a5b7484..c0093a6 100644
> --- a/debian.master/scripts/sub-flavour
> +++ b/debian.master/scripts/sub-flavour
> @@ -27,7 +27,7 @@ do
>  	#
>  	if echo "$line" | grep '\*' > /dev/null
>  	then
> -		if [ `eval find "$line" -name '*.ko'|wc -l` -lt 1 ]
> +		if [ `eval find "$line" -name '*.ko' 2>/dev/null|wc -l` -lt 1 ]
>  		then
>  			echo SUB_INST Warning - No files in $line
>  		fi
> @@ -46,7 +46,7 @@ cat ${DEBIAN}/sub-flavours/$TO.list | while read line; do
>  	cd debian/$from_pkg/lib/modules/$ABI_RELEASE-$FROM/kernel;
>  	if echo "$line" | grep '\*' > /dev/null
>  	then
> -		eval find "$line" -name '*.ko'
> +		eval find "$line" -name '*.ko' 2>/dev/null || true
>  	elif [ -f "$line" ]
>  	then
>  		echo "$line"
> @@ -60,7 +60,7 @@ done | while read mod; do
>  	while read m; do
>  		m="${fromdir}$m"
>  		test -f debian/$to_pkg/$m && continue
> -		echo "SUB_INST installing: $mod"
> +		echo "SUB_INST installing: $m"
>  		install -D -m644 debian/$from_pkg/$m \
>  			debian/$to_pkg/$m
>  	done

-apw




More information about the kernel-team mailing list