Control: tag -1 + patch

On Sun, 23 Jul 2017 15:22:40 +0200, Helmut Grohne wrote:

> perl 5.26 was uploaded. Now invoking dpkg-cross yields:
> 
> | Unescaped left brace in regex is illegal here in regex; marked by <-- HERE 
> in m/^datarootdir="\${ <-- HERE prefix}(.*)"$/ at /usr/bin/dpkg-cross line 
> 723.
> 

% perl -I. -wc dpkg-cross
Unable to read /etc/dpkg-cross/archtable.d/: No such file or directory
 at dpkg-cross line 10.
readdir() attempted on invalid dirhandle ARCHDIR at Debian/DpkgCross.pm line 95.
closedir() attempted on invalid dirhandle ARCHDIR at Debian/DpkgCross.pm line 
96.
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in 
m/^datarootdir="\${ <-- HERE prefix}(.*)"$/ at dpkg-cross line 723.

And there are some more.

Debdiff attached which escapes all that  `perl -wc' and me have found.


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Rolling Stones: Someone
diff -Nru dpkg-cross-2.6.15/debian/changelog dpkg-cross-2.6.15/debian/changelog
--- dpkg-cross-2.6.15/debian/changelog	2016-10-11 16:11:12.000000000 +0200
+++ dpkg-cross-2.6.15/debian/changelog	2017-07-23 22:57:08.000000000 +0200
@@ -1,3 +1,12 @@
+dpkg-cross (2.6.15-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix "dpkg-cross does not work with perl 5.26":
+    escape left braces in dokg-cross.
+    (Closes: #869433)
+
+ -- gregor herrmann <gre...@debian.org>  Sun, 23 Jul 2017 22:57:08 +0200
+
 dpkg-cross (2.6.15-1) unstable; urgency=medium
 
    * Adopted by Wookey
diff -Nru dpkg-cross-2.6.15/dpkg-cross dpkg-cross-2.6.15/dpkg-cross
--- dpkg-cross-2.6.15/dpkg-cross	2015-01-27 17:32:40.000000000 +0100
+++ dpkg-cross-2.6.15/dpkg-cross	2017-07-23 22:56:49.000000000 +0200
@@ -720,16 +720,16 @@
 					print TO "libdir=$crosslib\n";
 				}
 			# preserve original prefix for datarootdir entries
-			} elsif (/^datarootdir="\${prefix}(.*)"$/ or /^datarootdir=\${prefix}(.*)$/) {
+			} elsif (/^datarootdir="\$\{prefix}(.*)"$/ or /^datarootdir=\$\{prefix}(.*)$/) {
 			    print TO "datarootdir=${orig_prefix}${1}\n";
 			# preserve original (build arch) prefix for ${exec_prefix}/bin entries 
 			# (e.g. orbit_idl). 
-			} elsif (m:\${exec_prefix}/bin:) {
-				s:\${exec_prefix}/bin:${orig_prefix}/bin:;
+			} elsif (m:\$\{exec_prefix}/bin:) {
+				s:\$\{exec_prefix}/bin:${orig_prefix}/bin:;
 				print TO;
 			} elsif (/^includedir=/) {
 				my $inc = ($crossinc eq "$crossdir/include") ? "\${prefix}/include" : $crossinc;
-				s:\${(exec_)?prefix}/include:$inc:;
+				s:\$\{(exec_)?prefix}/include:$inc:;
 				print TO "includedir=$inc\n";
 			} elsif (m#^Cflags:.*(-I/usr/include)#) {
 				# dpkg-cross unconditionally moves /usr/include to /usr/$host/include

Attachment: signature.asc
Description: Digital Signature

Reply via email to