5.8.4. When bugs are closed by new uploads

As bugs and problems are fixed in your packages, it is your responsibility as the package maintainer to close these bugs. However, you should not close a bug until the package which fixes the bug has been accepted into the Debian archive. Therefore, once you get notification that your updated package has been installed into the archive, you can and should close the bug in the BTS. Also, the bug should be closed with the correct version.

However, it’s possible to avoid having to manually close bugs after the upload — just list the fixed bugs in your debian/changelog file, following a certain syntax, and the archive maintenance software will close the bugs for you. For example:

  1. acme-cannon (3.1415) unstable; urgency=low
  2. * Frobbed with options (closes: Bug#98339)
  3. * Added safety to prevent operator dismemberment, closes: bug#98765,
  4. bug#98713, #98714.
  5. * Added man page. Closes: #98725.

Technically speaking, the following Perl regular expression describes how bug closing changelogs are identified:

  1. /closes:\s*(?:bug)?\#\s*\d+(?:,\s*(?:bug)?\#\s*\d+)*/ig

We prefer the closes: #XXX syntax, as it is the most concise entry and the easiest to integrate with the text of the changelog. Unless specified differently by the -v-switch to dpkg-buildpackage, only the bugs closed in the most recent changelog entry are closed (basically, exactly the bugs mentioned in the changelog-part in the .changes file are closed).

Historically, uploads identified as Non-Maintainer Uploads (NMUs) were tagged fixed instead of being closed, but that practice was ceased with the advent of version-tracking. The same applied to the tag fixed-in-experimental.

If you happen to mistype a bug number or forget a bug in the changelog entries, don’t hesitate to undo any damage the error caused. To reopen wrongly closed bugs, send a reopenXXX command to the bug tracking system’s control address, control@bugs.debian.org. To close any remaining bugs that were fixed by your upload, email the .changes file to XXX-done@bugs.debian.org, where XXX is the bug number, and put Version: YYY and an empty line as the first two lines of the body of the email, where YYY is the first version where the bug has been fixed.

Bear in mind that it is not obligatory to close bugs using the changelog as described above. If you simply want to close bugs that don’t have anything to do with an upload you made, do it by emailing an explanation to XXX-done@bugs.debian.org. Do not close bugs in the changelog entry of a version if the changes in that version of the package don’t have any bearing on the bug.

For general information on how to write your changelog entries, see Best practices for debian/changelog.