From bea9112ac47676a51e47f6bcf7bbce001ca8675b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 2 Nov 2007 07:30:30 +0000 Subject: Remove an extra \$ from the EbuildQuote.var_reference regex so that it will properly match things like variable references without braces, like $S. (trunk r8354) Properly escape { and } characters in regular expressions even though it seems to work either way. (trunk r8355) svn path=/main/branches/2.1.2/; revision=8377 --- bin/repoman | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/repoman b/bin/repoman index 84033318a..f279900e3 100755 --- a/bin/repoman +++ b/bin/repoman @@ -760,10 +760,10 @@ class EbuildQuote(object): repoman_check_name = 'ebuild.minorsyn' ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export)\s+)') var_names = r'(D|S|T|ROOT|FILESDIR|WORKDIR)' - var_reference = re.compile(r'\$({'+var_names+'}|' + \ - r'\$' + var_names + '\W)') - missing_quotes = re.compile(r'(\s|^)[^"\s]*\${?' + var_names + \ - r'}?[^"\s]*(\s|$)') + var_reference = re.compile(r'\$(\{'+var_names+'\}|' + \ + var_names + '\W)') + missing_quotes = re.compile(r'(\s|^)[^"\s]*\$\{?' + var_names + \ + r'\}?[^"\s]*(\s|$)') cond_begin = re.compile(r'(^|\s+)\[\[($|\\$|\s+)') cond_end = re.compile(r'(^|\s+)\]\]($|\\$|\s+)') -- cgit v1.2.3-1-g7c22