summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-06 02:10:34 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-06 02:10:34 +0000
commit4c7fd8ac3aaa43ad2ece3a86fa9287a556d7d273 (patch)
treeab611aeeff4720cea9738669486c2513efd5a379
parentd46f13f06fc643c713c62e233dbef5c3d1ef12df (diff)
downloadportage-4c7fd8ac3aaa43ad2ece3a86fa9287a556d7d273.tar.gz
portage-4c7fd8ac3aaa43ad2ece3a86fa9287a556d7d273.tar.bz2
portage-4c7fd8ac3aaa43ad2ece3a86fa9287a556d7d273.zip
For bug #160310, allow \ inside `` quotes in order to prevent a false Line continuation ("\") Syntax Error.
svn path=/main/trunk/; revision=5470
-rwxr-xr-xbin/repoman5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman
index b274af510..50a2e2142 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1294,7 +1294,7 @@ for x in scanlist:
trailing_whitespace = re.compile(r'.*([\S]$)')
readonly_assignment = re.compile(r'^\s*(export\s+)?(A|CATEGORY|P|PV|PN|PR|PVR|PF|D|WORKDIR|FILESDIR|FEATURES|USE)=')
continuation_symbol = re.compile(r'(.*[ ]+[\\][ ].*)')
- line_continuation_quoted = re.compile(r'(\"|\')(([\w ,:;#\[\]\.`=/|\$\^\*{}()\'-])|(\\.))*\1')
+ line_continuation_quoted = re.compile(r'(\"|\'|`)(([\w ,:;#\[\]\.`=/|\$\^\*{}()\'-])|(\\.))*\1')
line_continuation = re.compile(r'([^#]*\S)(\s+|\t)\\$')
linenum=0
previous_line = None
@@ -1353,7 +1353,8 @@ for x in scanlist:
if match:
#Excluded lines not even containing a " \" match. Good!
line = re.sub(line_continuation_quoted,"\"\"",line)
- #line has been edited to collapsed "" and '' quotes to "". Good!
+ # line has been edited to collapse "", '', and ``
+ # quotes to "". Good!
match = continuation_symbol.match(line)
if match:
#Again exclude lines not even containing a " \" match. Good!