Bug #297541 - Make $(no-as-needed) trigger upstream.workaround warning. Thanks
authorZac Medico <zmedico@gentoo.org>
Mon, 21 Dec 2009 05:15:28 +0000 (05:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 21 Dec 2009 05:15:28 +0000 (05:15 -0000)
to Samuli Suominen <ssuominen@g.o> for this patch.

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

pym/repoman/checks.py
pym/repoman/errors.py

index 3156894f6feb18995c0f35271f7457df38082f57..4e83e66539fe825e4601d24af7f951ce6362aa94 100644 (file)
@@ -374,6 +374,12 @@ class EMakeParallelDisabledViaMAKEOPTS(LineCheck):
        re = re.compile(r'^\s*MAKEOPTS=(\'|")?.*-j\s*1\b')
        error = errors.EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS
 
+class NoAsNeeded(LineCheck):
+       """Check for calls to the no-as-needed function."""
+       repoman_check_name = 'upstream.workaround'
+       re = re.compile(r'.*\$\(no-as-needed\)')
+       error = errors.NO_AS_NEEDED
+
 class DeprecatedBindnowFlags(LineCheck):
        """Check for calls to the deprecated bindnow-flags function."""
        repoman_check_name = 'ebuild.minorsyn'
@@ -468,7 +474,7 @@ _constant_checks = tuple((c() for c in (
        EbuildUselessCdS, EbuildNestedDie,
        EbuildPatches, EbuildQuotedA, EapiDefinition,
        IUseUndefined, InheritAutotools,
-       EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS,
+       EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS, NoAsNeeded,
        DeprecatedBindnowFlags, SrcUnpackPatches, WantAutoDefaultValue,
        SrcCompileEconf, Eapi4IncompatibleFuncs, Eapi4GoneVars)))
 
index bab2faca7a1abec5346a81cc44e274c0f68359a4..b62af12b366da6e02c44c905460f91599b4059de 100644 (file)
@@ -17,3 +17,4 @@ EMAKE_PARALLEL_DISABLED = 'Upstream parallel compilation bug (ebuild calls emake
 EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS = 'Upstream parallel compilation bug (MAKEOPTS=-j1 on line: %d)'
 DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'
 EAPI_DEFINED_AFTER_INHERIT = 'EAPI defined after inherit on line: %d'
+NO_AS_NEEDED = 'Upstream asneeded linking bug (no-as-needed on line: %d)'