[Aptitude-devel] Bug#1117957: aptitude-curses.8: Some remarks and a patch with editorial changes for this man page
Bjarni Ingi Gislason
bjarniig at simnet.is
Sun Oct 12 21:06:24 BST 2025
Package: aptitude-common
Version: 0.8.13-8
Severity: minor
Tags: patch
* What led up to the situation?
Checking for defects with a new version
test-[g|n]roff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z < "man page"
[Use
grep -n -e ' $' -e '\\~$' -e ' \\f.$' -e ' \\"' <file>
to find (most) trailing spaces.]
["test-groff" is a script in the repository for "groff"; is not shipped]
(local copy and "troff" slightly changed by me).
[The fate of "test-nroff" was decided in groff bug #55941.]
* What was the outcome of this action?
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":
troff:<stdin>:1603: warning: trailing space in the line
* What outcome did you expect instead?
No output (no warnings).
-.-
General remarks and further material, if a diff-file exist, are in the
attachments.
-- System Information:
Debian Release: forky/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 6.16.9+deb14-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=is_IS.iso88591, LC_CTYPE=is_IS.iso88591 (charmap=ISO-8859-1), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
aptitude-common depends on no packages.
Versions of packages aptitude-common recommends:
ii aptitude 0.8.13-8
aptitude-common suggests no packages.
-- no debconf information
-------------- next part --------------
Input file is aptitude-curses.8
Output from "mandoc -T lint aptitude-curses.8": (shortened list)
116 STYLE: input text line longer than 80 bytes:
1 STYLE: whitespace at end of input line
7 WARNING: skipping paragraph macro: PP after SH
1 WARNING: skipping paragraph macro: br after SH
4 WARNING: skipping paragraph macro: br after br
Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
-.-.
Output from
test-nroff -mandoc -t -ww -z aptitude-curses.8: (shortened list)
1 line(s) with a trailing space
Find most trailing spaces with:
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
-.-.
Input file is aptitude-curses.8
Show if docman-to-man created this.
4:.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.-.
Remove space characters (whitespace) at the end of lines.
Use "git apply ... --whitespace=fix" to fix extra space issues, or use
global configuration "core.whitespace".
Number of lines affected is
2
-.-.
Change '-' (\-) to '\(en' (en-dash) for a (numeric) range.
GNU gnulib has recently (2023-06-18) updated its
"build_aux/update-copyright" to recognize "\(en" in man pages.
aptitude-curses.8:1887:Copyright 2004\-2011 Daniel Burrows\&.
aptitude-curses.8:1889:Copyright 2014\-2016 Manuel A\&. Fernandez Montecelo
-.-.
Strings longer than 3/4 of a standard line length (80).
Use "\:" to split the string at the end of an output line, for example a
long URL (web address).
This is a groff extension.
1095 \fB\-\-log\-level=\fR\fB<\fIlevel\fR>\fR, \fB\-\-log\-level=\fR\fB<\fIcategory\fR>\fR\fB:\fR\fB<\fIlevel\fR>\fR
1118 \fB\-\-log\-level=\fR\fB<\fIcategory\fR>\fR\fB:\fR\fB<\fIlevel\fR>\fR
1129 \fB\-\-log\-level=aptitude\&.resolver\&.hints\&.match:trace\fR, then messages in
1149 \fB\-\-log\-level=aptitude\&.resolver\&.search:trace \-\-log\-level=aptitude\&.resolver\&.search\&.tiers:info\fR\&.
-.-.
Wrong distance (not two spaces) between sentences in the input file.
Separate the sentences and subordinate clauses; each begins on a new
line. See man-pages(7) ("Conventions for source file layout") and
"info groff" ("Input Conventions").
The best procedure is to always start a new sentence on a new line,
at least, if you are typing on a computer.
Remember coding: Only one command ("sentence") on each (logical) line.
E-mail: Easier to quote exactly the relevant lines.
Generally: Easier to edit the sentence.
Patches: Less unaffected text.
Search for two adjacent words is easier, when they belong to the same line,
and the same phrase.
The amount of space between sentences in the output can then be
controlled with the ".ss" request.
Mark a final abbreviation point as such by suffixing it with "\&".
Some sentences (etc.) do not begin on a new line.
Split (sometimes) lines after a punctuation mark; before a conjunction.
Lines with only one (or two) space(s) between sentences could be split,
so latter sentences begin on a new line.
Use
#!/usr/bin/sh
sed -e '/^\./n' \
-e 's/\([[:alpha:]]\)\. */\1.\n/g' $1
to split lines after a sentence period.
Check result with the difference between the formatted outputs.
See also the attachment "general.bugs"
[List of affected lines removed.]
-.-.
Split lines longer than 80 characters into two or more lines.
Appropriate break points are the end of a sentence and a subordinate
clause; after punctuation marks.
Add "\:" to split the string for the output, "\<newline>" in the source.
[List of affected lines removed.]
Longest line is number 717 with 393 characters
dependency chain\&. That is, it looks for a chain that only contains packages which are installed or will be installed; it looks for the strongest possible dependencies under that restriction; it looks for chains that avoid ORed dependencies and Provides; and it looks for the shortest dependency chain meeting those criteria\&. These rules are progressively weakened until a match is found\&.
-.-.
Remove unnecessary double font change (e.g., \fR\fI) in a row or (better)
use a two-fonts macro.
[List with affected lines removed.]
76:\(lq\fB=\fR\fB<\fIversion\fR>\fR\(rq
79:\(lq\fB/\fR\fB<\fIarchive\fR>\fR\(rq
296:\(lq\fB=\fR\fB<\fIversion\fR>\fR\(rq
301:\(lq\fBaptitude install \fR\fB<\fIpackage\fR>\fR\(rq
303:\(lqinstall <\fIpackage\fR>\fB=\fR\fB<\fIversion\fR>\fR\(rq\&.
498:\fB=\fR\fB<\fIversion\fR>\fR
500:\fB/\fR\fB<\fIarchive\fR>\fR
502:\fB/\fR\fB<\fIrelease\fR>\fR
576:\fB\-\-group\-by\fR\fB=none\fR, in which case
594:\fB\-\-show\-package\-names\fR\fB=never\fR:
626:\fB?user\-tag(\fR\fB<\fItag\fR>\fR\fB)\fR
748:\fB=\fR\fB<\fIversion\fR>\fR
750:\fB/\fR\fB<\fIarchive\fR>\fR
752:\fB/\fR\fB<\fIrelease\fR>\fR
790:\fB\-\-add\-user\-tag \fR\fB<\fItag\fR>\fR
812:\fB\-\-add\-user\-tag\-to \fR\fB<\fItag\fR>\fR\fB,\fR\fB<\fIpattern\fR>\fR
1076:\fB\-\-log\-file=\fR\fB<\fIfile\fR>\fR
1095:\fB\-\-log\-level=\fR\fB<\fIlevel\fR>\fR, \fB\-\-log\-level=\fR\fB<\fIcategory\fR>\fR\fB:\fR\fB<\fIlevel\fR>\fR
1097:\fB\-\-log\-level=\fR\fB<\fIlevel\fR>\fR
1118:\fB\-\-log\-level=\fR\fB<\fIcategory\fR>\fR\fB:\fR\fB<\fIlevel\fR>\fR
1250:\fB\-q\fR\fB[=<\fIn\fR>]\fR, \fB\-\-quiet\fR\fB[=<\fIn\fR>]\fR
1262:\fB=\fR\fB<\fIn\fR>\fR
1297:\fB\-\-remove\-user\-tag \fR\fB<\fItag\fR>\fR
1319:\fB\-\-remove\-user\-tag\-from \fR\fB<\fItag\fR>\fR\fB,\fR\fB<\fIpattern\fR>\fR
1465:\fB\-\-show\-summary\fR\fB[=<\fIMODE\fR>]\fR
-.-.
Add a zero (0) in front of a decimal fraction that begins with a period
(.)
191:.sp .5v
390:.sp .5v
439:.sp .5v
711:.sp .5v
-.-.
Put a parenthetical sentence, phrase on a separate line,
if not part of a code.
See man-pages(7), item "semantic newline".
[List of affected lines removed.]
-.-.
FSF office address update. See
https://lists.gnu.org/archive/html/bug-gnulib/2024-09/msg00004.html
1895:You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc\&., 51 Franklin Street, Fifth Floor, Boston, MA 02110\-1301 USA\&.
-.-.
No need for '\&' to be in front of a period (.),
if there is a character in front of it.
Remove with "sed -e 's/\(.\)\\&\./\1./g'".
[List of affected lines removed.]
-.-.
Only one space character is after a possible end of sentence
(after a punctuation, that can end a sentence).
[List of affected lines removed.]
-.-.
Remove quotes when there is a printable
but no space character between them
and the quotes are not for emphasis (markup),
for example as an argument to a macro.
aptitude-curses.8:10:.TH "APTITUDE" "8" "10/07/2025" "aptitude 0.8.13" "Command-line reference"
aptitude-curses.8:30:.SH "NAME"
aptitude-curses.8:32:.SH "SYNOPSIS"
aptitude-curses.8:51:.SH "DESCRIPTION"
aptitude-curses.8:786:.SH "OPTIONS"
aptitude-curses.8:1800:.SH "ENVIRONMENT"
aptitude-curses.8:1850:.SH "FILES"
aptitude-curses.8:1873:.SH "AUTHORS"
aptitude-curses.8:1884:.SH "COPYRIGHT"
-.-.
Remove excessive "\&" when it has no functional purpose.
1875:\fBDaniel Burrows\fR <\&dburrows at debian.org\&>
1880:\fBManuel A. Fernandez Montecelo\fR <\&mafm at debian.org\&>
-.-.
Use "\-" instead of "-" in web addresses.
16:.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.-.
Add "\&" after an ellipsis, when it does not end a sentence.
34:\fBaptitude\fR [<\fIoptions\fR>...] {autoclean | clean | forget\-new | keep\-all | update}
36:\fBaptitude\fR [<\fIoptions\fR>...] {full\-upgrade | safe\-upgrade} [<\fIpackages\fR>...]
38:\fBaptitude\fR [<\fIoptions\fR>...] {build\-dep | build\-depends | changelog | download | forbid\-version | hold | install | markauto | purge | reinstall | remove | show | showsrc | source | unhold | unmarkauto | versions} <\fIpackages\fR>...
46:\fBaptitude\fR [<\fIoptions\fR>...] {why | why\-not} [<\fIpatterns\fR>...] <\fIpackage\fR>
-.-.
Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=0 -ww -z ":
troff:<stdin>:1603: warning: trailing space in the line
-.-
Generally:
Split (sometimes) lines after a punctuation mark; before a conjunction.
-------------- next part --------------
--- aptitude-curses.8 2025-10-12 19:00:52.399787789 +0000
+++ aptitude-curses.8.new 2025-10-12 19:48:19.368253568 +0000
@@ -49,13 +49,11 @@ aptitude \- high\-level interface to the
.HP \w'\fBaptitude\fR\ 'u
\fBaptitude\fR help
.SH "DESCRIPTION"
-.PP
\fBaptitude\fR
is a text\-based interface to the Debian GNU/Linux package system\&.
.PP
It allows the user to view the list of packages and to perform package management tasks such as installing, upgrading, and removing packages\&. Actions may be performed from a visual interface or from the command\-line\&.
.SH "COMMAND\-LINE ACTIONS"
-.PP
The first argument which does not begin with a hyphen (\(lq\fB\-\fR\(rq) is considered to be an action that the program should perform\&. If an action is not specified on the command\-line,
\fBaptitude\fR
will start up in visual mode\&.
@@ -784,7 +782,6 @@ Dependencies in binary package stanzas w
Displays a brief summary of the available commands and options\&.
.RE
.SH "OPTIONS"
-.PP
The following options may be used to modify the behavior of the actions described above\&. Note that while all options will be accepted for all commands, some options don\*(Aqt apply to particular commands and will be ignored by those commands\&.
.PP
\fB\-\-add\-user\-tag \fR\fB<\fItag\fR>\fR
@@ -1600,7 +1597,7 @@ Packages requiring foomatic\-db:
foomatic\-db\-hpijs D: foomatic\-db
foomatic\-gui D: python\-foomatic (>= 0\&.7\&.9\&.2) D: foomatic\-db\-engine D: foomatic\-db (>= 20090301)
printconf D: foomatic\-db
-
+
.fi
.if n \{\
.RE
@@ -1798,7 +1795,6 @@ Begins updating the package lists as soo
at the same time\&.
.RE
.SH "ENVIRONMENT"
-.PP
\fBHOME\fR
.RS 4
If
@@ -1848,7 +1844,6 @@ will use
/tmp\&.
.RE
.SH "FILES"
-.PP
/var/lib/aptitude/pkgstates
.RS 4
The file in which stored package states and some package flags are stored\&.
@@ -1865,13 +1860,11 @@ overrides
for documentation of the format and contents of these files\&.
.RE
.SH "SEE ALSO"
-.PP
\fBapt-get\fR(8),
\fBapt\fR(8),
/usr/share/doc/aptitude/html/<\fIlang\fR>/index\&.html
from the package aptitude\-doc\-<\fIlang\fR>
.SH "AUTHORS"
-.PP
\fBDaniel Burrows\fR <\&dburrows at debian.org\&>
.RS 4
Main author of the document.
@@ -1882,8 +1875,6 @@ Main author of the document.
Main maintainer after Daniel Burrows, documentation about new features, corrections and formatting.
.RE
.SH "COPYRIGHT"
-.br
-.PP
Copyright 2004\-2011 Daniel Burrows\&.
.PP
Copyright 2014\-2016 Manuel A\&. Fernandez Montecelo
-------------- next part --------------
Any program (person), that produces man pages, should check the output
for defects by using (both groff and nroff)
[gn]roff -mandoc -t -ww -b -z -K utf8 <man page>
To find trailing space use
grep -n -e ' $' -e ' \\f.$' -e ' \\"' <man page>
The same goes for man pages that are used as an input.
-.-
For a style guide use
mandoc -T lint
-.-
For general input conventions consult the man page "nroff(7)" (item
"Input conventions") or the Texinfo manual about the same item.
-.-
Any "autogenerator" should check its products with the above mentioned
'groff', 'mandoc', and additionally with 'nroff ...'.
It should also check its input files for too long (> 80) lines.
This is just a simple quality control measure.
The "autogenerator" may have to be corrected to get a better man page,
the source file may, and any additional file may.
Common defects:
Not removing trailing spaces (in in- and output).
The reason for these trailing spaces should be found and eliminated.
"git" has a "tool" to point out whitespace,
see for example "git-apply(1)" and git-config(1)")
Not beginning each input sentence on a new line.
Line length and patch size should thus be reduced.
The script "reportbug" uses 'quoted-printable' encoding when a line is
longer than 1024 characters in an 'ascii' file.
See man-pages(7), item "semantic newline".
-.-
The difference between the formatted output of the original
and patched file can be seen with:
nroff -mandoc <file1> > <out1>
nroff -mandoc <file2> > <out2>
diff -d -u <out1> <out2>
and for groff, using
\"printf '%s\n%s\n' '.kern 0' '.ss 12 0' | groff -mandoc -Z - \"
instead of 'nroff -mandoc'
Add the option '-t', if the file contains a table.
Read the output from 'diff -d -u ...' with 'less -R' or similar.
-.-.
If 'man' (man-db) is used to check the manual for warnings,
the following must be set:
The option "-warnings=w"
The environmental variable:
export MAN_KEEP_STDERR=yes (or any non-empty value)
or
(produce only warnings):
export MANROFFOPT="-ww -b -z"
export MAN_KEEP_STDERR=yes (or any non-empty value)
-.-
More information about the Aptitude-devel
mailing list