[PATCH]: linux-2.6: use string operators instead of numeric ones for string concatenation
Revision 16224 of svn://svn.debian.org/svn/kernel/dists/trunk/linux-2.6 enabled use strict; and use warnings; for the perl based maintainer scripts of linux-ima...@upstreamversion@@abiname@@localversion@, this in turn exposed that the numeric '+=' operator is used to concatenate $message and $dir_message variables; this patch fixes this by using the string operator '.='. Argument Module sub-directories were detected.\n isn't numeric in addition (+) at /var/lib/dpkg/tmp.ci/preinst line 100. Argument isn't numeric in addition (+) at /var/lib/dpkg/tmp.ci/preinst line 100. Signed-off-by: Stefan Lippers-Hollmann s@gmx.de --- debian/templates/temp.image.plain/preinst |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -Nrup a/debian/templates/temp.image.plain/preinst b/debian/templates/temp.image.plain/preinst --- a/debian/templates/temp.image.plain/preinst +++ b/debian/templates/temp.image.plain/preinst @@ -97,7 +97,7 @@ sub check { unless $dir_message; } } -$message += $dir_message if $dir_message; +$message .= $dir_message if $dir_message; } my @links = grep { -l $lib_modules/$_ } @children; @@ -108,10 +108,10 @@ sub check { next if ($link =~ /^source$/); $links_message = Symbolic links were detected in $modules_base/$version.\n; } -$message += $links_message if $links_message; +$message .= $links_message if $links_message; } my @files = grep { -f $lib_modules/$_ } @children; - $message += Additional files also exist in $modules_base/$version.\n + $message .= Additional files also exist in $modules_base/$version.\n if ($#files -1); } } -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/201009030942.20493.s@gmx.de
Re: [PATCH]: linux-2.6: use string operators instead of numeric ones for string concatenation
On Fri, 2010-09-03 at 09:42 +0200, Stefan Lippers-Hollmann wrote: Revision 16224 of svn://svn.debian.org/svn/kernel/dists/trunk/linux-2.6 enabled use strict; and use warnings; for the perl based maintainer scripts of linux-ima...@upstreamversion@@abiname@@localversion@, this in turn exposed that the numeric '+=' operator is used to concatenate $message and $dir_message variables; this patch fixes this by using the string operator '.='. Thanks for testing and reporting this. This sort of stupid bug is exactly why we need those directives. However, given that this bug was introduced by: kernel-package (10.037) unstable; urgency=medium ... * Vy popular demand, we toned down the checks for overwriting previously installed kernels. Instead of checking for /lib/modules/$version, we only check is /lib/modules/$version/kernel exists. This means that third party modules shall not trigger any interactions with the user; it is up to the users to handle incompatibilites between previously installed third party modules and the new kernel. No check on official kernel images -- any incompatibilities should result in an ABI number change. -- Manoj Srivastava sriva...@debian.org Wed, 22 Mar 2006 14:24:16 -0600 and makes the check() subroutine completely useless, and no-one seems to have complained, I think we could just remove it. Ben. -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse. signature.asc Description: This is a digitally signed message part