summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-02 07:30:30 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-02 07:30:30 +0000
commitbea9112ac47676a51e47f6bcf7bbce001ca8675b (patch)
tree67d236604c70789e94b2b974e0a8c4ccdf6f221c
parentdd134813921499946a6c05a859c0c5bc6fa84473 (diff)
downloadportage-bea9112ac47676a51e47f6bcf7bbce001ca8675b.tar.gz
portage-bea9112ac47676a51e47f6bcf7bbce001ca8675b.tar.bz2
portage-bea9112ac47676a51e47f6bcf7bbce001ca8675b.zip
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
-rwxr-xr-xbin/repoman8
1 files 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+)')