[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: A question concerning lintian



On 2015-01-16 23:52, SB wrote:
> Hi Niels,
> 
> I have cloned lintian and I am playing around with it, performing checks on
> installed .deb-packages located in /var/cache/apt/archives/, as a prelude to the
> job that I am about to do.
> 

:)

> I wonder how I can output a list of all the tags that are available.
> 

We do not have a built-in utility for it right now, but the script in
[1] should do.  That works for all tags provided by Lintian itself,
which I suspect is sufficient for your usage.  (The solution to the
general problem is different and requires more code).

> I have already checked the program's commands and options and the man pages, but
> I can't find something like --display all (tags available in lintian)
> 
> 
> Thanks in advance.
> 
> Kind regards
> 
> Stephan
> 

If it was there, it would be in lintian-info rather than lintian.

Also, bonus tip:

 <script from [1]> | LC_ALL=... xargs -r lintian-info -t | less

:)

~Niels


[1]

"""
#!/usr/bin/perl

use strict;
use warnings;

use Cwd();

BEGIN {
    my $root = $ENV{'LINTIAN_ROOT'} // Cwd::cwd();
    $ENV{'LINTIAN_ROOT'} = $root;
};

use lib "$ENV{'LINTIAN_ROOT'}/lib";

use Lintian::Profile;

my $profile = Lintian::Profile->new;

for my $tag (sort $profile->tags(1)) {
    print "$tag\n";
}
"""


Reply to: