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

Bug#935607: lintian: classify "Starting $DESC" in init.d scripts



On Wed, 2019-09-11 at 16:50:54 +0000, Dmitry Bogatov wrote:
> [2019-09-08 21:26] "Chris Lamb" <lamby@debian.org>
> > > unwanted and to be fixed.
> >
> > ... but, unless I'm missing something you can surely do that now
> > almost trivially using codesearch.debian.net and certainly much
> > quicker, independetly and with less hassle than introducing two new
> > Lintian tags, etc.
> >
> > I thus suggest you do that and come back to this bug when you/we have
> > a concrete implementation plan.
> 
> I should have thought about it myself. Codesearch gives following
> result:
> 
>  1. search for literal `Starting $DESC' gives three pages of init
>     scripts. Majority (but not overwhelming, around 2/3) of them do
>     /not/ check for $VERBOSE.
> 
>     Not very representative, given there is ~1300 services in Debian.
> 
>  2. search for `log_daemon_msg "Starting' gives 85 pages, with around 2/3
>     (eyeball estimate) not checking for $VERBOSE. This search covers 850
>     init scripts, which is rather good part.
> 
>  3. search for literal `"Starting ' gives hundred of pages, most of them
>     false-positive (logging in C code).
> 
> Not unanimous, but I believe that *checking* for $VERBOSE should be
> marked as deprecated.

Checking for VERBOSE explicitly in the init scripts seems like an
anti-pattern to me. We have the log functions precisely to hide this
kind of detail, instead of duplicating it all over the place. If
anything, these functions might need to honor VERBOSE, so then users
that want non-verbose output can set it appropriately.

Thanks,
Guillem


Reply to: