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

Bug#396454: lintian: Check for LSB logging usage in init.d scripts



Hi Russ and David, dear Lintian maintainers,

Le 01.11.2006 04:14, Russ Allbery a écrit :
> David Härdeman <david@hardeman.nu> writes:
> 
>> Package: lintian
>> Version: 1.23.25
>> Severity: wishlist
> 
>> Now that lintian checks for LSB boot dependency headers in init.d scripts,
>> it would be nice if it could also check whether the script(s) use the LSB
>> logging functions to generate messages.
> 
>> Looking for lines containing "echo" might be a sufficient check...
> 
> I'm not at all convinced that using the LSB logging functions is even a
> good idea, let alone someting lintian should be diagnosing, until the
> quality of messages omitted using them is up to what could be done
> before.  Right now, switching to the LSB logging functions results in a
> significant loss of readability and clarity for failure messages.

I think we can fairly assume that this situation is now widely different
than what it was back in 2006: the functions from
/lib/lsb/init-functions are in wide use all around Debian init scripts.

Now, I think that lintian could still do one thing rather easily: check
that only DebianPolicy-compliant functions are used. According to
lsb-base's README.Debian, there are three LSB-mandated functions that
are not DebianPolicy-compliant (while still being provided by
/lib/lsb/init-functions) that packages should not use:

	log_success_msg message
	log_failure_msg message
	log_warning_msg message

The functions that should be used instead are listed in the same
README.Debian.

Checking for uses of those should not need much more than grepping the
init scripts and wouldn't need the "decent shell script parser"
currently blocking this bug. IMHO.

I would make this a "certain" "warning" lintian check. Opinions?

Cheers,

OdyX

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: