From: Erich Eckner <a...@eckner.net>

Architecture-specific variables should be useable as soon as a package
is not built for 'any' architecture. With the deprecation of i686, this
becomes relevant, as many packages are now only built for x86_64.
However, the source (and checksums) may be _not_ architecture-agnostic,
e.g. should _not_ be listed as source= but source_x86_64=.

This patch silences the extra-var-begins-without-underscore message
which is currently emitted in that case.

Signed-off-by: Erich Eckner <a...@eckner.net>
---
 Namcap/rules/extravars.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Namcap/rules/extravars.py b/Namcap/rules/extravars.py
index ba4df2d..81084f8 100644
--- a/Namcap/rules/extravars.py
+++ b/Namcap/rules/extravars.py
@@ -31,7 +31,7 @@ class package(PkgbuildRule):
                                 'pkgbase', 'pkgver', 'pkgrel', 'epoch', 
'pkgdesc', 'groups',
                                 'url', 'install', 'changelog',
                                 'options', 'validpgpkeys'] + carch_vars
-               if 'arch' in pkginfo and len(pkginfo["arch"]) >= 2:
+               if 'arch' in pkginfo and pkginfo['arch'] != ['any']:
                        stdvars.extend(v+'_'+a for v,a in product(carch_vars, 
pkginfo["arch"]))
                for varname in pkginfo["setvars"]:
                        if varname.islower() and varname not in stdvars \
-- 
2.20.1

Reply via email to