On 2015-02-06 23:34, Rajendra Gokhale wrote:
> Hello,
>
> First of all, I wanted to let you know that lintian is a cool tool and
> thank you all for creating and maintaining it
>
Hi, :)
Thanks,
> If I ask Lintian to suppress a tag that is known to a later version of
> Lintian but not known to the current version it will exit with an error.
> This can be problematic in an environment where a package gets built on
> different versions of OSes running different versions of Lintian
> (potentially). Is there a recommended way to getting around such a
> scenario?
>
> Thanks,
>
> Rajendra Gokhale
>
It is possible, although there is not really a built in solution for it.
You can use lintian-info to query for known tags vs unknown tags. I
suspect something like the following sh/bash template might work:
"""
SUPPRESSED_TAGS=
for tag in <LIST-OF-TAGS-TO-SUPPRESS> ; do
if lintian-info -t $tag > /dev/null ; then
SUPPRESSED_TAGS="$SUPPRESSED_TAGS,$tag"
fi
done
if [ "$SUPPRESSED_TAGS" != "" ] ; then
SUPPRESSED_TAGS=$(echo "$SUPPRESSED_TAGS" | sed 's/^,//')
fi
lintian --suppress-tags "$SUPPRESSED_TAGS" <OTHER-ARGUMENTS>
"""
Though it can have a considerable overhead if <LIST-OF-TAGS-TO-SUPPRESS>
is rather long, as it has to invoke lintian-info once for each of them.
Thanks,
~Niels