[arch-projects] [namcap][PATCH] add two rules which check if a PKGBUILD for vcs packages contains the correct makedepends and conflicts array

Rémy Oudompheng remyoudompheng at gmail.com
Tue Sep 10 03:54:45 EDT 2013


2013/9/8 Jelle van der Waa <jelle at vdwaa.nl>:
> +       def analyze(self, pkginfo, tar):
> +               if 'name' in pkginfo:
> +                       if any(pkginfo["name"].endswith(vcs) for vcs in vcspackages) and not "conflicts" in pkginfo:
> +                               self.warnings.append(("vcs-package-conflicts", ()))
> +

Python trick: you can write

if pkginfo["name"].endswith(tuple(vcspackages)) and "conflicts" not in pkginfo:
    ...

-- 
Rémy.


More information about the arch-projects mailing list