Removing frog.
[maemian] / checks / debconf.desc
1 Check-Script: debconf
2 Author: Colin Watson <cjwatson@debian.org>
3 Abbrev: dc
4 Type: binary, udeb, source
5 Unpack-Level: 2
6 Info: This looks for common mistakes in packages using debconf.
7 Needs-Info: scripts
8
9 Tag: missing-debconf-dependency
10 Severity: normal
11 Certainty: possible
12 Info: Packages using debconf should depend on it, since debconf is not an
13  essential package.
14
15 Tag: missing-debconf-dependency-for-preinst
16 Severity: normal
17 Certainty: possible
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.
22  
23 Tag: duplicate-fields-in-templates
24 Severity: important
25 Certainty: certain
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.
29
30 Tag: unknown-field-in-templates
31 Severity: important
32 Certainty: certain
33 Info: Valid fields are currently "Template:", "Type:", "Choices:", "Default:",
34  and "Description:".
35 Ref: debconf-spec aen45, debconf-devel(7)
36
37 Tag: no-template-name
38 Severity: important
39 Certainty: certain
40 Info: The templates file contains a template without a "Template:" field.
41
42 Tag: malformed-template-name
43 Severity: important
44 Certainty: certain
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 ".".
48
49 Tag: no-template-type
50 Severity: important
51 Certainty: certain
52 Info: The templates file contains a template without a "Type:" field.
53
54 Tag: unknown-template-type
55 Severity: important
56 Certainty: certain
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".
60
61 Tag: empty-translated-choices
62 Severity: important
63 Certainty: possible
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.
67
68 Tag: mismatch-translated-choices
69 Severity: important
70 Certainty: certain
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.
76  .
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.
80
81 Tag: select-without-choices
82 Severity: important
83 Certainty: certain
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)
87
88 Tag: boolean-template-has-bogus-default
89 Severity: important
90 Certainty: certain
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)
94
95 Tag: no-template-description
96 Severity: important
97 Certainty: certain
98 Info: The templates file contains a template without a "Description:" field.
99 Ref: debconf-spec aen45, debconf-devel(7)
100
101 Tag: duplicate-long-description-in-template
102 Severity: minor
103 Certainty: certain
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.
107
108 Tag: config-does-not-load-confmodule
109 Severity: normal
110 Certainty: certain
111 Info: The config script must load one of the debconf libraries.
112
113 Tag: postinst-uses-db-input
114 Severity: normal
115 Certainty: certain
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.
120
121 Tag: postinst-does-not-load-confmodule
122 Severity: normal
123 Certainty: certain
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
126  the future.
127
128 Tag: loads-obsolete-confmodule
129 Severity: normal
130 Certainty: certain
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)
135
136 Tag: postrm-does-not-purge-debconf
137 Severity: normal
138 Certainty: certain
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
141  take care of this.
142
143 Tag: isdefault-flag-is-deprecated
144 Severity: normal
145 Certainty: possible
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.
151  .
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.
155
156 Tag: debconf-config-not-executable
157 Severity: important
158 Certainty: certain
159 Info: The debconf "config" script in the package control area must be
160  executable.
161
162 Tag: no-debconf-config
163 Severity: important
164 Certainty: possible
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
167  error.
168
169 Tag: no-debconf-templates
170 Severity: normal
171 Certainty: possible
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
174  error.
175
176 Tag: debconf-is-not-a-registry
177 Severity: important
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.
187  .
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)
193
194 Tag: malformed-prompt-in-templates
195 Severity: normal
196 Certainty: certain
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.
201  .
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.
204 Ref: devref 6.5.4.2
205
206 Tag: malformed-title-in-templates
207 Severity: normal
208 Certainty: certain
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,
211  colon, or semicolon.
212 Ref: devref 6.5.4.2.4
213
214 Tag: malformed-question-in-templates
215 Severity: normal
216 Certainty: certain
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.
221  .
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
225
226 Tag: using-question-in-extended-description-in-templates
227 Severity: normal
228 Certainty: certain
229 Info: The extended description of a debconf template should never include
230  a question.
231  .
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.
234 Ref: devref 6.5.3.2
235
236 Tag: using-imperative-form-in-templates
237 Severity: normal
238 Certainty: certain
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.
242 Ref: devref 6.5.4.2
243
244 Tag: using-first-person-in-templates
245 Severity: normal
246 Certainty: possible
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.
251  .
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.
254 Ref: devref 6.5.2.5
255
256 Tag: making-assumptions-about-interfaces-in-templates
257 Severity: normal
258 Certainty: possible
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
262  boolean questions.
263 Ref: devref 6.5.2.4
264
265 Tag: too-long-short-description-in-templates
266 Severity: normal
267 Certainty: certain
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.
272 Ref: devref 6.5.3.2
273
274 Tag: too-long-extended-description-in-templates
275 Severity: normal
276 Certainty: certain
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
279  this limit.
280 Ref: devref 6.5.3.2
281
282 Tag: unknown-debconf-priority
283 Severity: important
284 Certainty: certain
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)
289
290 Tag: possible-debconf-note-abuse
291 Severity: normal
292 Certainty: possible
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.
296  .
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
299  important.
300  .
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.
307 Ref: policy 3.9.1
308
309 Tag: select-with-boolean-choices
310 Severity: normal
311 Certainty: possible
312 Info: Select templates with only yes and no choices should use the boolean
313  type instead.
314 Ref: debconf-devel(7)
315
316 Tag: template-uses-unsplit-choices
317 Severity: normal
318 Certainty: possible
319 Experimental: yes
320 Info: The use of _Choices in templates is deprecated.
321  An _Choices field must be translated as a single string.
322  .
323  Using __Choices allows each choice to be translated separately, easing
324  translation and is therefore recommended.
325  .
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.
329  .
330  If in doubt, please ask for help on the debian-i18n mailing list.
331 Ref: po-debconf(7)
332
333 Tag: unused-debconf-template
334 Severity: minor
335 Certainty: possible
336 Info: Templates which are not used by the package should be removed from
337  the templates file.
338  .
339  This will reduce the size of the templates database and prevent
340  translators from unnecessarily translating the template's text.
341  .
342  In some cases, the template is used but Maemian is unable to determine
343  this.  Common causes are:
344  .
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>)
348  .
349  - the template is not used by the maintainer scripts but is used by
350  a program in the package
351  .
352  - the maintainer scripts are written in perl.  lintian currently only
353  understands the shell script debconf functions.
354  .
355  If any of the above apply, please install an override.