summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoshua Megerman <josh@honorablemenschen.com>2011-12-14 17:03:29 +0200
committerPanu Matilainen <pmatilai@redhat.com>2011-12-14 17:19:12 +0200
commitd936230973b91a16b5c2c5c7e4665a98bdde4332 (patch)
treec6fca373a683bc0c31c11591f6e51dfb48ddf251 /scripts
parent139105056d2a40e5e9c9b7dd44981c8d9da5e343 (diff)
downloadlibrpm-tizen-d936230973b91a16b5c2c5c7e4665a98bdde4332.tar.gz
librpm-tizen-d936230973b91a16b5c2c5c7e4665a98bdde4332.tar.bz2
librpm-tizen-d936230973b91a16b5c2c5c7e4665a98bdde4332.zip
Fix brace matching on multiline constructs in perl.req (RhBug:752119)
- /usr/lib/rpm/perl.req scans for the opening brace type on lines, but then only scans for closing curly braces ('}') instead of the proper losing brace type when that closing brace occures on a different line. This means that any use/require statements that occur after the multi-line q{} statement but before the first closing curly brace in the file will be ignored. Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/perl.req3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/perl.req b/scripts/perl.req
index 90d8e6bdd..cd2cbded4 100755
--- a/scripts/perl.req
+++ b/scripts/perl.req
@@ -120,8 +120,9 @@ sub process_file {
if ( m/^.*\Wq[qxwr]?\s*([{([#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) {
$tag = $1;
$tag =~ tr/{\(\[\#|\//})]#|\//;
+ $tag = quotemeta($tag);
while (<FILE>) {
- ( $_ =~ m/\}/ ) && last;
+ ( $_ =~ m/$tag/ ) && last;
}
}