Bug #212621 - Make the EbuildQuote check do quoting validation for misc
authorZac Medico <zmedico@gentoo.org>
Tue, 25 Mar 2008 04:04:44 +0000 (04:04 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 25 Mar 2008 04:04:44 +0000 (04:04 -0000)
variables from games.eclass.

svn path=/main/trunk/; revision=9507

pym/repoman/checks.py

index ea76f6a019bd6bbeae5c7f46d4c75644abf13779..aa5bf18453cf568b7aba12663b8052f7ce1a6303 100644 (file)
@@ -77,7 +77,14 @@ class EbuildQuote(LineCheck):
 
        repoman_check_name = 'ebuild.minorsyn'
        ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export)\s+)')
-       var_names = r'(D|DISTDIR|FILESDIR|S|T|ROOT|WORKDIR)'
+       var_names = ["D", "DISTDIR", "FILESDIR", "S", "T", "ROOT", "WORKDIR"]
+
+       # variables for games.eclass
+       var_names += ["Ddir", "dir", "GAMES_PREFIX_OPT", "GAMES_DATADIR",
+               "GAMES_DATADIR_BASE", "GAMES_SYSCONFDIR", "GAMES_STATEDIR",
+               "GAMES_LOGDIR", "GAMES_BINDIR"]
+
+       var_names = "(%s)" % "|".join(var_names)
        var_reference = re.compile(r'\$(\{'+var_names+'\}|' + \
                var_names + '\W)')
        missing_quotes = re.compile(r'(\s|^)[^"\'\s]*\$\{?' + var_names + \