Fix the EbuildQuote check to ignore "echo" and the elog functions since
authorZac Medico <zmedico@gentoo.org>
Mon, 28 Apr 2008 01:30:49 +0000 (01:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 28 Apr 2008 01:30:49 +0000 (01:30 -0000)
people might not want quotes in those cases. (trunk r10006)

svn path=/main/branches/2.1.2/; revision=10011

bin/repoman

index 5720bf112d91271e969ac7a5ecd5da485dd4819b..5cf54d6d56a20adc587edacd46a80b6d9652f663 100755 (executable)
@@ -955,7 +955,10 @@ class EbuildQuote(LineCheck):
        """Ensure ebuilds have valid quoting around things like D,FILESDIR, etc..."""
 
        repoman_check_name = 'ebuild.minorsyn'
-       ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export)\s+)')
+       _ignored_commands = ["echo", "local", "export"]
+       _ignored_commands += ["eerror", "einfo", "elog", "eqawarn", "ewarn"]
+       ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)' + \
+               r'|(^\s*(' + "|".join(_ignored_commands) + r')\s+)')
        var_names = ["D", "DISTDIR", "FILESDIR", "S", "T", "ROOT", "WORKDIR"]
 
        # variables for games.eclass