[projects/cleanbuild] {}-s must be escaped in perl regexp

glen glen at pld-linux.org
Thu Dec 15 09:48:50 CET 2016


commit 3ac4924e5a002d2d760d64c6292fbc289727cc98
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Dec 15 10:48:43 2016 +0200

    {}-s must be escaped in perl regexp

 addbr | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/addbr b/addbr
index dd9f28b..b101e39 100755
--- a/addbr
+++ b/addbr
@@ -25,7 +25,7 @@ open FILE, "<", $file;
 my @in = <FILE>;
 close FILE;
 
-my $brm = qr/#?(?:%{!?\?with_\S+:)?\s*BuildRequires:\s*(\S+)\s*(?:(>|>=|==|<=|<).*)?}?/i;
+my $brm = qr/#?(?:%\{!?\?with_\S+:)?\s*BuildRequires:\s*(\S+)\s*(?:(>|>=|==|<=|<).*)?\}?/i;
 foreach ( @in ) {
 	if ( /^$brm$/o ) {
 		if ( $1 eq $add ) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/cleanbuild.git/commitdiff/3ac4924e5a002d2d760d64c6292fbc289727cc98



More information about the pld-cvs-commit mailing list