Bug#359059: [frontend] load custom checks from ~/.lintian/checks?
tags 359059 = wontfix thanks As previously discussed on the mailing list, this isn't a feature we currently want to support in lintian. One of the goals of lintian is to produce consistent output regardless of how it's run. We'd rather that people donate their own checks, and for special circumstances, one can always make a copy of the root directory, modify it however, and then point lintian at it. -- Russ Allbery ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Processed: Re: Bug#359059: [frontend] load custom checks from ~/.lintian/checks?
Processing commands for [EMAIL PROTECTED]: tags 359059 = wontfix Bug#359059: [frontend] load custom checks from ~/.lintian/checks? Tags were: patch Tags set to: wontfix thanks Stopping processing here. Please contact me if you need assistance. Debian bug tracking system administrator (administrator, Debian Bugs database) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: load custom checks from ~/.lintian/checks?
Michael Ablassmeier [EMAIL PROTECTED] writes: i just wondered how am i supposed to add my own checks to lintian. It seems the only way to do this (without beeing root) is to copy the stuff from /usr/share/lintian to $HOME and use the --root switch to change $LINTIAN_ROOT. I think it would be very nice if lintian could check ~/.lintian/checks for checks and load them, just like linda does. Attached is a (i guess pretty hackish patch) against trunk which does this. This seems like at least an idea worth considering. Could you submitt his and your patch as a wishlist bug report? I don't know about the other lintian developers, but I try really hard not to keep things sitting around in my inbox because then they nag at me and feel like clutter. If you put the patch into the BTS, it will be there each time I review current bugs to find something to work on. Thanks! -- Russ Allbery ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: load custom checks from ~/.lintian/checks?
On Sat, Mar 25, 2006 at 11:53:53AM -0800, Russ Allbery wrote: Michael Ablassmeier [EMAIL PROTECTED] writes: i just wondered how am i supposed to add my own checks to lintian. It seems the only way to do this (without beeing root) is to copy the stuff from /usr/share/lintian to $HOME and use the --root switch to change $LINTIAN_ROOT. I think it would be very nice if lintian could check ~/.lintian/checks for checks and load them, just like linda does. Attached is a (i guess pretty hackish patch) against trunk which does this. This seems like at least an idea worth considering. Could you submitt his and your patch as a wishlist bug report? I don't know about the other lintian developers, Well, I agree such request are best filed as bugs immediately, for the same reasons you (Russ) cite, but I can already say that personally, I'm not really terribly fond of this idea. Lintian should IMHO really be a tool that has a reliable output, and that can be used as a base for structural QA work etc. An important requisite for this is that lintian output should be constant regardless of your environment. There is --root for development on lintian, testing out/using locally certain patches (including simply added checks). ~/.lintian/checks might be neat, but only addresses a small subset, because it can only add checks, and then only checks that don't need any sort of collector changes. --root actually allows any kind of adoption, and is very easy too (just a cp -a or even cp -sa and adding/modifying whatever pleases you). --Jeroen -- Jeroen van Wolffelaar [EMAIL PROTECTED] (also for Jabber MSN; ICQ: 33944357) http://Jeroen.A-Eskwadraat.nl -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: load custom checks from ~/.lintian/checks?
Jeroen van Wolffelaar [EMAIL PROTECTED] writes: Well, I agree such request are best filed as bugs immediately, for the same reasons you (Russ) cite, but I can already say that personally, I'm not really terribly fond of this idea. Lintian should IMHO really be a tool that has a reliable output, and that can be used as a base for structural QA work etc. An important requisite for this is that lintian output should be constant regardless of your environment. There is --root for development on lintian, testing out/using locally certain patches (including simply added checks). ~/.lintian/checks might be neat, but only addresses a small subset, because it can only add checks, and then only checks that don't need any sort of collector changes. --root actually allows any kind of adoption, and is very easy too (just a cp -a or even cp -sa and adding/modifying whatever pleases you). Hm, yes, those are both really good points. -- Russ Allbery ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
load custom checks from ~/.lintian/checks?
hi, i just wondered how am i supposed to add my own checks to lintian. It seems the only way to do this (without beeing root) is to copy the stuff from /usr/share/lintian to $HOME and use the --root switch to change $LINTIAN_ROOT. I think it would be very nice if lintian could check ~/.lintian/checks for checks and load them, just like linda does. Attached is a (i guess pretty hackish patch) against trunk which does this. :~$ perl lintian --root /home/abi/lintian/trunk/ /home/abi/strnew/*.deb E: streamripper: my-custom-check :~$ ls -1 ~/.lintian/checks my-custom-check my-custom-check.desc bye, - michael Index: frontend/lintian === --- frontend/lintian(revision 585) +++ frontend/lintian(working copy) @@ -892,76 +892,86 @@ $Tags::show_overrides = $show_overrides; use warnings; -# load information about checker scripts -opendir(CHECKDIR, $LINTIAN_ROOT/checks) -or fail(cannot read directory $LINTIAN_ROOT/checks); +my @checkdirs = ( $LINTIAN_ROOT ); +if ( -d $ENV{HOME}./.lintian/checks/ ) { + push @checkdirs, $ENV{HOME}./.lintian/ +} -for my $f (readdir CHECKDIR) { -next unless $f =~ /\.desc$/; -print N: Reading checker description file $f ...\n if $debug = 2; +foreach my $DIR (@checkdirs) { + +# load information about checker scripts +opendir(CHECKDIR, $DIR/checks) + or fail(cannot read directory $DIR/checks: $!); -my @secs = read_dpkg_control($LINTIAN_ROOT/checks/$f); -my $script; -($script = $secs[0]-{'check-script'}) - or fail(error in description file $f: `Check-Script:' not defined); +for my $f (readdir CHECKDIR) { + next unless $f =~ /\.desc$/; + print N: Reading checker description file $f ...\n if $debug = 2; -# ignore check `lintian' (this check is a special case and contains the -# tag info for the lintian frontend--this script here) -if ($secs[0]-{'check-script'} ne 'lintian') { + my @secs = read_dpkg_control($DIR/checks/$f); + my $script; + ($script = $secs[0]-{'check-script'}) + or fail(error in description file $f: `Check-Script:' not defined); - delete $secs[0]-{'check-script'}; - $check_info{$script}-{'script'} = $script; - my $p = $check_info{$script}; + # ignore check `lintian' (this check is a special case and contains the + # tag info for the lintian frontend--this script here) + if ($secs[0]-{'check-script'} ne 'lintian') { - set_value($f,$p,'type',$secs[0],1); - # convert Type: - my ($b,$s,$u) = ( , , ); - for (split(/\s*,\s*/o,$p-{'type'})) { - if ($_ eq 'binary') { - $b = 'b'; - } elsif ($_ eq 'source') { - $s = 's'; - } elsif ($_ eq 'udeb') { - $u = 'u'; - } else { - fail(unknown type $_ specified in description file $f); + delete $secs[0]-{'check-script'}; + $check_info{$script}-{'script'} = $DIR./checks/.$script; + my $p = $check_info{$script}; + + set_value($f,$p,'type',$secs[0],1); + # convert Type: + my ($b,$s,$u) = ( , , ); + for (split(/\s*,\s*/o,$p-{'type'})) { + if ($_ eq 'binary') { + $b = 'b'; + } elsif ($_ eq 'source') { + $s = 's'; + } elsif ($_ eq 'udeb') { + $u = 'u'; + } else { + fail(unknown type $_ specified in description file $f); + } } - } - $p-{'type'} = $s$b$u; + $p-{'type'} = $s$b$u; - set_value($f,$p,'unpack-level',$secs[0],1); - set_value($f,$p,'abbrev',$secs[0],1); + set_value($f,$p,'unpack-level',$secs[0],1); + set_value($f,$p,'abbrev',$secs[0],1); - if (exists $secs[0]-{'needs-info'} defined $secs[0]-{'needs-info'}) { - for (split(/\s*,\s*/o,$secs[0]-{'needs-info'})) { - $p-{$_} = 1; - } - delete $secs[0]-{'needs-info'}; - } + if (exists $secs[0]-{'needs-info'} defined $secs[0]-{'needs-info'}) { + for (split(/\s*,\s*/o,$secs[0]-{'needs-info'})) { + $p-{$_} = 1; + } + delete $secs[0]-{'needs-info'}; + } - # ignore Info: and other fields for now... - delete $secs[0]-{'info'}; - delete $secs[0]-{'standards-version'}; - delete $secs[0]-{'author'}; + # ignore Info: and other fields for now... + delete $secs[0]-{'info'}; + delete $secs[0]-{'standards-version'}; + delete $secs[0]-{'author'}; - for (keys %{$secs[0]}) { - print STDERR warning: unused tag $_ in description file $f\n; - } + for (keys %{$secs[0]}) { + print STDERR warning: unused tag $_ in description file