[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#808875: debian-installer: Perl transition



On Thu, 24 Dec 2015 00:28:40 +0100, Cyril Brulebois wrote:

> In addition, one can see that kind of warnings during the build now:
> | Unescaped left brace in regex is deprecated, passed through in regex;
> | marked by <-- HERE in m/\${ <-- HERE BOOTPROMPT}\n?$/ at
> | util/bootvars-subst line 13.
> 
> so one has to make sure how much d-i is affected by this transition.

Here's a patch for these warnings [0].


Cheers,
gregor


[0] which are harmless, unless something tests for "no warnings
output", but also easy to fix. perldoc perldiag says:

    Unescaped left brace in regex is deprecated, passed through in regex;
    marked by <-- HERE in m/%s/
        (D deprecated, regexp) You used a literal "{" character in a regular
        expression pattern. You should change to use "\{" instead, because a
        future version of Perl (tentatively v5.26) will consider this to be a
        syntax error. If the pattern delimiters are also braces, any matching
        right brace ("}") should also be escaped to avoid confusing the
        parser, for example,
        
            qr{abc\{def\}ghi}
        

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer -  https://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Joint Venture: Der Jesus von Oberpleis
diff --git a/build/util/bootvars-subst b/build/util/bootvars-subst
index e3e1fed..16a1227 100755
--- a/build/util/bootvars-subst
+++ b/build/util/bootvars-subst
@@ -10,8 +10,8 @@ while (@ARGV) {
 }
 
 while (<>) {
-	s/\${BOOTPROMPT}\n?$//g; # special case
-	s/\${([a-zA-Z0-9_]+)}/$subst{$1}/g;
+	s/\$\{BOOTPROMPT\}\n?$//g; # special case
+	s/\$\{([a-zA-Z0-9_]+)\}/$subst{$1}/g;
 	
 	print;
 }
diff --git a/build/util/pkg-list b/build/util/pkg-list
index b2faec8..29c56c9 100755
--- a/build/util/pkg-list
+++ b/build/util/pkg-list
@@ -234,10 +234,10 @@ sub getlists {
 				next unless length;
 				
 				# normal kernel version substitution
-				if (/\${kernel:Version}/) {
+				if (/\$\{kernel:Version\}/) {
 					foreach my $v (@kernel_versions) {
 						my $l=$_;
-						$l=~s/\${kernel:Version}/$v-$kernel_flavour/g;
+						$l=~s/\$\{kernel:Version\}/$v-$kernel_flavour/g;
 						collectpackage($l, \%collect, \%exclude, \@postponed);
 					}
 					next; # move on to the next line

Attachment: signature.asc
Description: Digital Signature


Reply to: