On Thursday 10 December 2009, Joey Hess wrote:
> Frans Pop wrote:
> > > (unless the string comes in via passthrough).
> >
> > And that is exactly where most "obsolete command" warnings currently
> > come from :-/
>
> And most of _those_ in turn are probably due to debconf communicating
> the default titles it sets ("Configuring <package>"), not due to a
> package calling TITLE.Right. > Maybe passthrough could use SETITLE for that, rather than TITLE. It > would have to send along info about a pretend template that had a > description consiing of the title value. Not sure about namespace issues > for that, etc. There's a comment about that in the passthrough code, but just removing the warning solves the problem as well. Using TITLE in the passthrough frontend does seem natural enough. As long as we're keeping TITLE I see no real reason to make things more complex. > From my grepping, a lintian test for "db_title <hardcoded string here>" > would be useful. Agreed. I'll file a bug report. Although there will be false positives (htdig for example has a string that needs no translation), and even a variable can contain an untranslated string of course. > > But if you feel there are valid use cases for TITLE I'm not against > > keeping it, but in that case I think the deprecation warning in > > cdebconf should be removed. I think D-I developers are sufficiently > > aware of translation issues that they'll not use it. > > I have no problem with removing that warning. Done. How about the attached modified patch then? Instead of warning that TITLE is deprecated, it now explains why SETTITLE is normally to be preferred.
diff -ur debconf-1.5.28.orig/doc/man/debconf-devel.7 debconf-1.5.28/doc/man/debconf-devel.7 --- debconf-1.5.28.orig/doc/man/debconf-devel.7 2009-12-10 13:59:58.000000000 +0100 +++ debconf-1.5.28/doc/man/debconf-devel.7 2009-12-10 14:13:12.000000000 +0100 @@ -266,17 +266,21 @@ replies for you. .RE .TP -.B TITLE string -This sets the title debconf displays to the user. You rarely need to use -this command since debconf can automatically generate a title based on -your package's name. -.TP .B SETTITLE question -This sets the title to the short description of the template for the -specified question. The template should be of type title. The advantage -this has over the TITLE command is that it allows for titles to be stored -in the same place as the rest of the debconf questions, and allows them to -be translated. +.RS +This sets the title debconf displays to the user, using the short description +of the template for the specified question. The template should be of type +title. You rarely need to use this command since debconf can automatically +generate a title based on your package's name. +.P +Setting the title from a template means they are stored in the same place +as the rest of the debconf questions, and allows them to be translated. +.RE +.TP +.B TITLE string +This sets the title debconf displays to the user to the specified string. +Use of the SETTITLE command is normally to be preferred as it allows for +translation of the title. .TP .B INPUT priority question .RS

