You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Chris Lawrence 7c94a40520 Correct version number of etch 17 years ago
debian Changelog entry for UCE warning 17 years ago
po4a Add po4a support. 17 years ago
README.developers Document /bin/bash requirement. 17 years ago
TODO Ubuntu changes. 19 years ago This commit was generated by cvs2svn to compensate for changes in r3, 19 years ago Comment out debugging code. 17 years ago Vague (and unsuccessful) attempts to plug the memory allocation bugs. 17 years ago
handle_bugscript Fix redirection bug which apparently emerged due to bash 3.0. 19 years ago This commit was generated by cvs2svn to compensate for changes in r3, 19 years ago
presubj Correct version number of etch 17 years ago
querybts Handle UI fallback gracefully. 17 years ago
querybts.1 Various changes on the way to 3.12 18 years ago Fix minor stupido. 19 years ago
reportbug Make prompt less debian-specific 17 years ago
reportbug.1 Document pseudopackages 17 years ago
reportbug.conf Correct example file. 19 years ago
reportbug.el This commit was generated by cvs2svn to compensate for changes in r3, 19 years ago Add French translation of man page. 19 years ago
reportbug.ja.1 Various changes on the way to 3.12 18 years ago Improve handling when dlocate fails; improve behavior with new exim. 17 years ago Add exception for UINotImportable 17 years ago Add po4a support. 17 years ago Add UINotImportable exception handling 17 years ago UTF-8 fixups 17 years ago Change default from None to '' in get_string. 17 years ago
script Apply latest core changes from Philipp Kern. 17 years ago This commit was generated by cvs2svn to compensate for changes in r3, 19 years ago Finalize 3.30 17 years ago


This file is lifted, almost verbatim, from "bug".

BUG'S Features for Developers

Bug allows maintainers to control the bug reporting process by placing
files in special places.

Template Information & Interaction with the user

If /usr/share/bug/$package is executable, then bug executes it and
takes what comes out from the file descriptor 3 and puts it in the bug
The maintainer can then ask questions to the user or run whatever
information gathering script he likes, and echo all the content to fd 3.

read -p 'color? '
echo "Color: $REPLY" >&3
system-information-tool >&3

If /usr/share/bug/$package is a directory, then
/usr/share/bug/$package/script is executed.

While the script is executed, the following shell functions are
available ONLY IF IT IS RUN UNDER /bin/bash:

getkey - asks for a key
yesno <prompt> "yep"|"nop" - ask for a yes/no answer (with i18n)
leaves response as yep or nop
in REPLY. The second argument is
the default.

If the file /usr/share/bug/$package/presubj exists, its content is
shown to the user before asking him for the bug's subject.

Note: It's your responsibility to check if the information included
in the template can put the user in any security risk.

Package redirection

The package maintainer can control to which packages bug reports are
submitted, by setting the Package: field of the bug report. This will
be mainly used to redirect bugs in packages coming from a single
source to where the maintainer likes to have them.

This is done by having this line in /usr/share/bug/$package/control:

Submit-As: $new-package

Note that bug will not check if the $new-package exists as a valid package.

BTS selection

Packages not distributed by Debian can take advantage of this utility too.
They just need to add a "send-to" header to the control file


`bug' will add `submit@' `quiet@' or `maintonly@' to form the address the
bug report mail is send to.

(Note: you probably should use dpkg's support for Origin and Bugs tags
in lieu of this support.)

Nicolás Lichtmaier.-

Related packages

Often programs are distributed across several different packages, for
example an upstream package 'foo' may be packaged in Debian as foo, libfoo,
foo-common and foo-data. In such cases it can be useful to include related
package information in bugreports, to minimise the need for 'moreinfo' requests
to the submitter :) This is done by adding a "report-with" header to the
control file.

report-with: foo libfoo foo-common foo-data

Package information will be added to the bug report for each extra package

You can also request that the status information for other packages
(that are not dependencies or recommendations) be included with the
report using the "package-status" header.

package-status: bar baz

Addendum: Languages other than SH

The script in /usr/share/bug/reportbug/script is an example of a bug
handling script written in Python. You can also write bug handlers in
many other languages that allow direct access to file descriptors,
including Perl and C/C++.

Note that the getkey and yesno functions are only available in scripts
written using /bin/bash as their interpreter; for other shells or
languages, you will need to write your own input parsing functions.