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

Re: [SCM] Debian package checker branch, master, updated. 38002a14d5e0b494449410efb1d8555ead1cef30



On Sun, 2008-07-06 at 12:24 +0000, Adam D. Barratt wrote:
> The following commit has been merged in the master branch:
> commit 38002a14d5e0b494449410efb1d8555ead1cef30
> Author: Adam D. Barratt <adam@adam-barratt.org.uk>
> Date:   Sun Jul 6 13:23:01 2008 +0100
> 
>     Detect unused templates and check all maintainer scripts for issues

I've added the new check at "info" level as I wasn't sure that "warning"
was appropriate given the cases that we can't detect.

There are two cases where we'd ideally check all scripts but still only
check config and postinst.

> -	    if (not $obsoleteconfmodule and
> +	    if (($file eq 'postinst' or $file eq 'config') and
> +		not $obsoleteconfmodule and
>  	        m,(/usr/share/debconf/confmodule\.sh|
>  	           Debian::DebConf::Client::ConfModule),x) {
>  	        tag "$file-loads-obsolete-confmodule", "$1";

This could be easily fixed by renaming the postinst variant to
maintainer-script-loads-obsolete-confmodule - or just
loads-obsolete-confmodule. Does renaming tags cause any major issues?
(other than invalidating any overrides for the tag).

> -	unless ($usesconfmodule) {
> -	    tag "$file-does-not-load-confmodule", ""
> -		unless ($type eq 'udeb' || ($file eq 'postinst' && !$seenconfig));
> +	if ($file eq 'postinst' or $file eq 'config') {
> +	    unless ($usesconfmodule) {
> +		tag "$file-does-not-load-confmodule", ""
> +		    unless ($type eq 'udeb' || ($file eq 'postinst' && !$seenconfig));

This one would be slightly more complicated as it requires determining
whether the {pre,post}rm and preinst scripts use debconf. It also has
the potential to require yet-another-does-not-load-confmodule tag,
unless we renamed the postinst tag to be more generic; there is a fair
amount of postinst-specific information in its description currently.

Adam


Reply to: