Adding side stream changes to Maemian. Working to integrate full upstream libraries...
[maemian] / nokia-lintian / checks / menus.desc
diff --git a/nokia-lintian/checks/menus.desc b/nokia-lintian/checks/menus.desc
new file mode 100644 (file)
index 0000000..c030fe2
--- /dev/null
@@ -0,0 +1,315 @@
+Check-Script: menus
+Author: Christian Schwarz <schwarz@debian.org>
+Abbrev: men
+Type: binary
+Unpack-Level: 1
+Needs-Info: doc-base-files
+
+Tag: postinst-should-not-set-usr-doc-link
+Type: warning
+Info: The technical committee chose the symlink transition method to move
+ from FSSTND to FHS.  That transition has been completed with woody and thus
+ this link is no longer required.
+
+Tag: maintainer-script-does-not-check-for-existence-of-updatemenus
+Type: error
+Info: The maintainer script calls the <tt>update-menus</tt> command without
+ checking for existence first. (The <tt>menu</tt> package which provides the
+ command is not marked as `essential' package.)
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+
+Tag: maintainer-script-does-not-check-for-existence-of-wm-menu-config
+Type: error
+Info: The maintainer script calls the <tt>wm-menu-config</tt> command without
+ checking for existence first. (The <tt>menu</tt> package which provides
+ the command is not marked as `essential' package.)
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/sbin/wm-menu ]; then /usr/sbin/wm-menu-config; fi
+
+Tag: maintainer-script-does-not-check-for-existence-of-installdocs
+Type: error
+Info: The maintainer script calls the <tt>install-docs</tt> command without
+ checking for existence first. (The <tt>doc-base</tt> package which provides
+ the command is not marked as `essential' package.)
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/sbin/install-docs ]; then
+    /usr/sbin/install-docs -i /usr/share/doc-base/&lt;your-package&gt;
+  fi
+
+Tag: maintainer-script-calls-deprecated-wm-menu-config
+Type: warning
+Info: The use of the wm-menu-config script is deprecated because it's
+ design had some serious flaws. Please see the menu documentation,
+ chapter 5 for more information.
+
+Tag: preinst-calls-updatemenus
+Type: error
+Info: The preinst script calls the <tt>update-menus</tt> command. Usually,
+ this command should be called from the <tt>postinst</tt> maintainer script.
+
+Tag: preinst-calls-installdocs
+Type: error
+Info: The preinst script calls the <tt>install-docs</tt> command. Usually,
+ this command should be called from the <tt>postinst</tt> maintainer script.
+
+Tag: prerm-calls-updatemenus
+Type: error
+Info: The prerm script calls the <tt>update-menus</tt> command. Usually,
+ this command should be called from the <tt>postrm</tt> maintainer script.
+
+Tag: postrm-calls-installdocs
+Type: error
+Info: The postrm script calls the <tt>install-docs</tt> command. Usually,
+ this command should be called from the <tt>prerm</tt> maintainer script.
+
+Tag: executable-menu-file
+Type: warning
+Info: Menu files should normally not be marked as executables. You only
+ need to do this if your package has to generate menu entries dynamically.
+
+Tag: menu-file-in-usr-lib
+Type: warning
+Info: As of menu, version 2.1.25, /usr/lib/menu as location for menu
+ files is deprecated (but still works perfectly). Menu files should
+ now be placed in /usr/share/menu instead. Only menu files that are
+ actually binary executables still need to go to /usr/lib/menu.
+
+Tag: executable-in-usr-share-docbase
+Type: error
+Info: Files in <tt>/usr/share/doc-base</tt> may not be marked as executables.
+
+Tag: postinst-does-not-call-installdocs
+Type: error
+Info: Since the package installs a file in <tt>/usr/share/doc-base</tt>, the
+ package should probably call the <tt>install-docs</tt> command in its
+ <tt>postinst</tt> script.
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/sbin/install-docs ]; then
+    /usr/sbin/install-docs -i /usr/share/doc-base/&lt;your-package&gt;
+  fi
+
+Tag: prerm-does-not-call-installdocs
+Type: error
+Info: Since the package installs a file in <tt>/usr/share/doc-base</tt>, the
+ package should probably call the <tt>install-docs</tt> command in its
+ <tt>prerm</tt> script.
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/sbin/install-docs ]; then
+    /usr/sbin/install-docs -r &lt;your-package&gt; || true
+  fi
+
+Tag: postinst-does-not-call-updatemenus
+Type: error
+Info: Since the package installs a file in either <tt>/usr/lib/menu</tt> or
+ <tt>/etc/menu-methods</tt>, the package should probably call the
+ <tt>update-menus</tt> command in it's <tt>postinst</tt> script.
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+
+Tag: postrm-does-not-call-updatemenus
+Type: error
+Info: Since the package installs a file in either <tt>/usr/lib/menu</tt> or
+ <tt>/etc/menu-methods</tt>, the package should probably call the
+ <tt>update-menus</tt> command in it's <tt>postrm</tt> script.
+ .
+ For example, use the following code in your maintainer script:
+  if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
+
+Tag: postinst-has-useless-call-to-update-menus
+Type: warning
+Info: The <tt>postinst</tt> script calls the <tt>update-menus</tt> program
+ though no file is installed in <tt>/usr/lib/menu</tt> or
+ <tt>/etc/menu-methods</tt>.
+
+Tag: postrm-has-useless-call-to-update-menus
+Type: warning
+Info: The <tt>postrm</tt> script calls the <tt>update-menus</tt> program
+ though no file is installed in <tt>/usr/lib/menu</tt> or
+ <tt>/etc/menu-methods</tt>
+
+Tag: postinst-has-useless-call-to-install-docs
+Type: error
+Info: The <tt>postinst</tt> script calls the <tt>install-docs</tt> program
+ though no file is installed in <tt>/usr/share/doc-base</tt>.
+
+Tag: prerm-has-useless-call-to-install-docs
+Type: error
+Info: The <tt>prerm</tt> script calls the <tt>install-docs</tt> program
+ though no file is installed in <tt>/usr/share/doc-base</tt>.
+
+Tag: bad-menu-file-name
+Severity: 4
+Significance: 3
+Info: The package installs a file <tt>/usr/lib/menu/menu</tt>, which is
+ already in use by the <tt>menu</tt> package itself.  The menu file should
+ be named after the package that installs it.
+
+Tag: doc-base-file-references-usr-doc
+Type: warning
+Info: Files in <tt>/usr/share/doc-base</tt> should only contain links to
+ files in the <tt>/usr/share/doc</tt> directory.
+
+Tag: doc-base-index-references-multiple-files
+Type: error
+Info: The Index field in a doc-base file should reference the single index
+ file for that document.  Any other files belonging to the same document
+ should be listed in the Files field.
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-file-references-missing-file
+Type: error
+Info: One of the files referenced in an Index or Files field in this
+ doc-base control file does not exist in the package.  The doc-base
+ control files should be installed by the package that provides the
+ documents they are registering.
+
+Tag: doc-base-file-unknown-format
+Type: warning
+Info: The Format field in this doc-base control file declares a format
+ that is not supported.  Recognized formats are "HTML", "Text", "PDF",
+ "PostScript", "Info", "DVI", and "DebianDoc-SGML" (case-insensitive).
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-file-no-format
+Type: error
+Info: A format section of this doc-base control file didn't specify a
+ format.  Each section after the first must specify a format.
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-file-no-format-section
+Type: error
+Info: This doc-base control file didn't specify any format
+ section.
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-file-no-index
+Type: error
+Info: Format sections in doc-base control files for HTML or Info documents
+ must contain an Index field specifying the starting document for the
+ documentation.  Even if the documentation is a single file, this field
+ must be present.
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-document-field-ends-in-whitespace
+Type: error
+Info: The Document field in a doc-base file should not end in whitespace.
+ doc-base (at least as of 0.8.5) cannot cope with such fields and
+ debhelper 5.0.57 or earlier may create files ending in whitespace when
+ installing such files.
+
+Tag: doc-base-document-field-not-in-first-line
+Type: error
+Info: The Document field in doc-base control file must be located at
+ first line of the file.  While unregistering documents, doc-base 0.8
+ and later parses only the first line of the control file for performance
+ reasons.
+Ref: Debian doc-base Manual section 2.3.2.1
+
+Tag: doc-base-file-unknown-field
+Type: error
+Info: The doc-base control file contains field which is either unknown
+ or not valid for the section where was found.  Possible reasons for this
+ error are: a typo in field name, missing empty line between control file
+ sections, or an extra empty line separating sections.
+Ref: Debian doc-base Manual sections 2.3.2.1 and 2.3.2.2
+
+Tag: doc-base-file-duplicated-field
+Type: error
+Info: The doc-base control file contains duplicated field.
+
+Tag: doc-base-file-duplicated-format
+Type: error
+Info: The doc-base control file contains a duplicated format.  Doc-base
+ files must not register different documents in one control file.
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-file-lacks-required-field
+Type: error
+Info: The doc-base control file does not contain a required field for the
+ appropriate section.
+Ref: Debian doc-base Manual sections 2.3.2.1 and 2.3.2.2
+
+Tag: doc-base-invalid-document-field
+Type: error
+Info: The Document field should consists only of letters (a-z), digits
+ (0-9), plus (+) or minus (-) signs, and dots (.).  In particular,
+ uppercase letters are not allowed.
+Ref: Debian doc-base Manual section 2.2
+
+Tag: doc-base-abstract-field-is-template
+Type: warning
+Info: The Abstract field of doc-base contains a "manage online manuals"
+ phrase, which was copied verbatim from an example control file found in
+ section 2.3.1 of the Debian doc-base Manual.
+
+Tag: doc-base-abstract-might-contain-extra-leading-whitespaces
+Type: warning
+Info: Continuation lines of the Abstract field of doc-base control file
+ should start with only one space unless they are meant to be displayed
+ verbatim by fontends.
+Ref: Debian doc-base Manual section 2.3.2
+
+Tag: doc-base-abstract-field-separator-extra-whitespaces
+Type: warning
+Info: Unnecessary spaces were found in the paragraph separator line of the
+ doc-base's Abstract field.  The separator line should consist of a single
+ space followed by a single dot.
+Ref: Debian doc-base Manual section 2.3.2
+
+Tag: spelling-error-in-doc-base-title-field
+Type: warning
+Info: Lintian found a spelling or capitalization error in the Title field
+ of this doc-base control file.  Lintian has a list of common misspellings
+ that it looks for.  It does not have a dictionary like a spelling checker
+ does.
+
+Tag: spelling-error-in-doc-base-abstract-field
+Type: warning
+Info: Lintian found a spelling or capitalization error in the Abstract
+ field of this doc-base control file.  Lintian has a list of common
+ misspellings that looks for.  It does not have a dictionary like a
+ spelling checker does.
+
+Tag: doc-base-file-syntax-error
+Type: error
+Info: Lintian found a syntax error in the doc-base control file.
+Ref: Debian doc-base Manual section 2.3.2.2
+
+Tag: doc-base-file-separator-extra-whitespaces
+Type: warning
+Info: Unnecessary spaces were found in the doc-base file sections'
+ separator.  The section separator is an empty line and should not contain
+ any whitespace.
+Ref: Debian doc-base Manual section 2.3.2
+
+Tag: doc-base-file-uses-obsolete-national-encoding
+Type: error
+Info: doc-base files must be valid UTF-8, an encoding of the Unicode
+ character set.
+ .
+ There are many ways to convert a doc-base file from an obsolete encoding
+ like ISO-8859-1.  You may, for example, use "iconv" like:
+ .
+  $ iconv -f ISO-8859-1 -t UTF-8 doc-base &gt; doc-base.new
+  $ mv doc-base.new doc-base
+Ref: Debian doc-base Manual section 2.3.2
+
+Tag: doc-base-unknown-section
+Type: warning
+Info: The section indicated in this doc-base control file is not one of
+ the standard doc-base sections.  The doc-base sections are based on the
+ menu sections but are not exactly the same.
+Ref: Debian doc-base Manual section 2.3.3
+
+Tag: menu-method-should-include-menu-h
+Type: error
+Info: A menu-method file must include the menu.h configuration file
+ (using "!include menu.h").
+Ref: Debian Menu System manual section 5