2 Author: Colin Watson <cjwatson@debian.org>
4 Type: binary, udeb, source
6 Info: This looks for common mistakes in packages using debconf.
9 Tag: missing-debconf-dependency
12 Info: Packages using debconf should depend on it, since debconf is not an
15 Tag: missing-debconf-dependency-for-preinst
18 Info: Packages using debconf in their preinst script must pre-depend
19 on debconf, with appropriate discussion on &debdev;. Since debconf is
20 almost always already installed, this is normally better than depending
21 on it and falling back to a different configuration system.
23 Tag: duplicate-fields-in-templates
26 Info: A template contains two identical fields (with identical values or
27 not). This is either an error in this template, or two templates are
28 not properly separated by a lone newline.
30 Tag: unknown-field-in-templates
33 Info: Valid fields are currently "Template:", "Type:", "Choices:", "Default:",
35 Ref: debconf-spec aen45, debconf-devel(7)
40 Info: The templates file contains a template without a "Template:" field.
42 Tag: malformed-template-name
45 Info: The "Template:" field should contain more than one component, each
46 separated by a slash ("/"). Each component may only consist of the
47 alphanumeric characters, "+", "-", and ".".
52 Info: The templates file contains a template without a "Type:" field.
54 Tag: unknown-template-type
57 Info: A "Type:" field in a templates file provided by this package uses an
58 unknown data type. Valid types are currently "string", "boolean", "select",
59 "multiselect", "note", "text", and "password".
61 Tag: empty-translated-choices
64 Info: When the translation of a Choices: field is empty, the whole question
65 is skipped (and nothing is selected). Please verify that the translation
66 you're using is valid.
68 Tag: mismatch-translated-choices
71 Info: A "Choices:" field is a comma separated list, and translated
72 "Choices:" fields must have the exact same number of elements. One
73 of the translations does not follow this rule, you should contact the
74 translator and request for a new translation where elements of "Choices:"
75 fields have no embedded commas.
77 Cdebconf understands escaped commas in such fields, but packages
78 outside the scope of debian-installer must not have them until they are
79 also supported by debconf.
81 Tag: select-without-choices
84 Info: Templates using the "select" or "multiselect" data types must provide
85 a "Choices:" field listing the possible values of the template.
86 Ref: debconf-spec aen45, debconf-devel(7)
88 Tag: boolean-template-has-bogus-default
91 Info: The "boolean" type in a debconf template, can have only two values: true
92 and false. The default has been set to something different.
93 Ref: debconf-spec aen45, debconf-devel(7)
95 Tag: no-template-description
98 Info: The templates file contains a template without a "Description:" field.
99 Ref: debconf-spec aen45, debconf-devel(7)
101 Tag: duplicate-long-description-in-template
104 Info: The long description of one of the templates provided by this package
105 is a duplicate of the short description. If you cannot provide a good
106 extended description, it is better to leave it blank.
108 Tag: config-does-not-load-confmodule
111 Info: The config script must load one of the debconf libraries.
113 Tag: postinst-uses-db-input
116 Info: It is generally not a good idea for postinst scripts to use debconf
117 commands like <tt>db_input</tt>. Typically, they should restrict themselves
118 to <tt>db_get</tt> to request previously acquired information, and have the
119 config script do the actual prompting.
121 Tag: postinst-does-not-load-confmodule
124 Info: Even if your postinst does not involve debconf, you currently need to
125 make sure it loads one of the debconf libraries. This will be changed in
128 Tag: loads-obsolete-confmodule
131 Info: The maintainer script uses an obsolete name for a debconf confmodule.
132 Shell scripts should source <tt>/usr/share/debconf/confmodule</tt>, while
133 Perl scripts should use <tt>Debconf::Client::ConfModule</tt>.
134 Ref: debconf-devel(7)
136 Tag: postrm-does-not-purge-debconf
139 Info: Packages using debconf should call <tt>db_purge</tt> or its equivalent
140 in their postrm. If the package uses debhelper, dh_installdebconf(1) should
143 Tag: isdefault-flag-is-deprecated
146 Info: The "isdefault" flag on debconf questions is deprecated as of debconf
147 0.5.00, and has been replaced by "seen" with the inverse meaning. From
148 debconf 0.5 onwards there should be very few reasons to use isdefault/seen
149 anyway, as backing up works much better now. See
150 /usr/share/doc/debconf-doc/changelog.gz for more information.
152 The misuse of isdefault often leads to questions being asked twice in one
153 installation run, or, worse, on every upgrade. Please test your package
154 carefully to make sure this does not happen.
156 Tag: debconf-config-not-executable
159 Info: The debconf "config" script in the package control area must be
162 Tag: no-debconf-config
165 Info: The package contains a "templates" file in its control area but has no
166 corresponding "config" script. This is occasionally OK, but is usually an
169 Tag: no-debconf-templates
172 Info: The package contains a "config" script in its control area but has no
173 corresponding "templates" file. This is occasionally OK, but is usually an
176 Tag: debconf-is-not-a-registry
178 Certainty: wild-guess
179 Info: In the Unix tradition, Debian packages should have human-readable and
180 human-editable configuration files. This package uses debconf commands
181 outside its maintainer scripts, which often indicates that it is taking
182 configuration information directly from the debconf database. Typically,
183 packages should use debconf-supplied information to generate
184 configuration files, and -- to avoid losing configuration information on
185 upgrades -- should parse these configuration files in the <tt>config</tt>
186 script if it is necessary to ask the user for changes.
188 Some standalone programs may legitimately use debconf to prompt the user
189 for questions. If you maintain a package containing such a program,
190 please install an override. Other exceptions to this check include
191 configuration scripts called from the package's post-installation script.
192 Ref: devref 6.5.1, debconf-devel(7)
194 Tag: malformed-prompt-in-templates
197 Info: The short description of a select, multiselect, string and password
198 debconf template is a prompt and not a title. Avoid question style
199 prompts ("IP Address?") in favour of "opened" prompts ("IP address:").
200 The use of colons is recommended.
202 If this template is only used internally by the package and not displayed
203 to the user, put "for internal use" in the short description.
206 Tag: malformed-title-in-templates
209 Info: The short description of a note debconf template should be written
210 as a title and therefore should not end with a period, question mark,
212 Ref: devref 6.5.4.2.4
214 Tag: malformed-question-in-templates
217 Info: The short description of a boolean debconf template should be
218 phrased in the form of a question which should be kept short and should
219 generally end with a question mark. Terse writing style is permitted and
220 even encouraged if the question is rather long.
222 If this template is only used internally by the package and not displayed
223 to the user, put "for internal use" in the short description.
224 Ref: devref 6.5.4.2.2
226 Tag: using-question-in-extended-description-in-templates
229 Info: The extended description of a debconf template should never include
232 If this template is only used internally by the package and not displayed
233 to the user, put "for internal use" in the short description.
236 Tag: using-imperative-form-in-templates
239 Info: Do not use useless imperative constructions such as "Please choose...",
240 "Enter...". The interface will make it obvious that the user needs to
241 choose or enter something.
244 Tag: using-first-person-in-templates
247 Info: You should avoid the use of first person ("I will do this..." or
248 "We recommend..."). The computer is not a person and the Debconf
249 templates do not speak for the Debian developers. You should use neutral
250 construction and often the passive form.
252 If this template is only used internally by the package and not displayed
253 to the user, put "for internal use" in the short description.
256 Tag: making-assumptions-about-interfaces-in-templates
259 Info: Template text should not make reference to widgets belonging to
260 some debconf interfaces. Sentences like "If you answer Yes..." have no
261 meaning for users of graphical interfaces which use checkboxes for
265 Tag: too-long-short-description-in-templates
268 Info: The short description should be kept short (50 characters or so) so
269 that it may be accommodated by most debconf interfaces. Keeping it short
270 also helps translators, as usually translations tend to end up being
271 longer than the original.
274 Tag: too-long-extended-description-in-templates
277 Info: Some debconf interfaces cannot deal very well with descriptions of
278 more than about 20 lines, so try to keep the extended description below
282 Tag: unknown-debconf-priority
285 Info: The given maintainer script calls db_input or or db_text with a
286 first argument that doesn't match one of the known priorities. The
287 supported priorities are low, medium, high, and critical.
288 Ref: debconf-devel(7)
290 Tag: possible-debconf-note-abuse
293 Info: Debconf notes should be used only for important notes that the
294 user really should see, since debconf will go to great pains to make
295 sure the user sees it.
297 Displaying a note with a low priority is conflicting with this statement,
298 since using a low or medium priority shows that the note is not
301 The right fix is NOT to increase the priority of the note, but to move
302 it somewhere else in the inline documentation, for example in a
303 README.Debian file for notes about package usability or NEWS.Debian for
304 changes in the package behavior, or to simply drop it if it is not
305 needed (e.g. "welcome" notes). Changing the templates type to "error"
306 can also be appropriate, such as for input validation errors.
309 Tag: select-with-boolean-choices
312 Info: Select templates with only yes and no choices should use the boolean
314 Ref: debconf-devel(7)
316 Tag: template-uses-unsplit-choices
320 Info: The use of _Choices in templates is deprecated.
321 An _Choices field must be translated as a single string.
323 Using __Choices allows each choice to be translated separately, easing
324 translation and is therefore recommended.
326 Instead of simply replacing all occurrences of "_Choices" by "__Choices",
327 apply the method described in po-debconf(7) under "SPLITTING CHOICES
328 LIST", to avoid breaking existing translations.
330 If in doubt, please ask for help on the debian-i18n mailing list.
333 Tag: unused-debconf-template
336 Info: Templates which are not used by the package should be removed from
339 This will reduce the size of the templates database and prevent
340 translators from unnecessarily translating the template's text.
342 In some cases, the template is used but Maemian is unable to determine
343 this. Common causes are:
345 - the maintainer scripts embed a variable in the template name in
346 order to allow a template to be selected from a range of similar
347 templates (e.g. <tt>db_input low start_$service_at_boot</tt>)
349 - the template is not used by the maintainer scripts but is used by
350 a program in the package
352 - the maintainer scripts are written in perl. lintian currently only
353 understands the shell script debconf functions.
355 If any of the above apply, please install an override.