Package: apt Version: 2.9.29 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 "groff -e ' $' -e '\\~$' <file>" to find obvious 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? troff:<stdin>:69: warning: trailing space in the line troff:<stdin>:75: warning: trailing space in the line troff:<stdin>:76: 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: trixie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 6.12.12-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) Versions of packages apt depends on: ii adduser 3.137 ii base-passwd 3.6.6 ii debian-archive-keyring 2023.4 ii libapt-pkg6.0t64 2.9.29 ii libc6 2.40-6 ii libgcc-s1 14.2.0-16 ii libseccomp2 2.5.5-2 ii libssl3t64 3.4.1-1 ii libstdc++6 14.2.0-16 ii libsystemd0 257.3-1 ii sqv 1.2.1-6+b1 Versions of packages apt recommends: ii ca-certificates 20241223 Versions of packages apt suggests: ii apt-doc 2.9.29 ii aptitude 0.8.13-6.1 ii dpkg-dev 1.22.15 ii gnupg 2.2.46-1 pn powermgmt-base <none> -- no debconf information
Input file is apt-cache.8 Output from "mandoc -T lint apt-cache.8": (shortened list) 2 empty block: RS 1 input text line longer than 80 bytes: Adds the given file ... 1 input text line longer than 80 bytes: All command line opt... 1 input text line longer than 80 bytes: Configuration File; ... 1 input text line longer than 80 bytes: Note that a package ... 1 input text line longer than 80 bytes: Only search on the p... 1 input text line longer than 80 bytes: Perform automatic pa... 1 input text line longer than 80 bytes: Print full records f... 1 input text line longer than 80 bytes: Quiet; produces outp... 1 input text line longer than 80 bytes: Select the file to s... 1 input text line longer than 80 bytes: Separate arguments c... 1 input text line longer than 80 bytes: Set a Configuration ... 1 input text line longer than 80 bytes: Show audit (and noti... 1 input text line longer than 80 bytes: The resulting nodes ... 1 input text line longer than 80 bytes: This command prints ... 1 input text line longer than 80 bytes: Thus it may be seen ... 1 input text line longer than 80 bytes: and it stores a pars... 1 input text line longer than 80 bytes: can be compressed in... 1 input text line longer than 80 bytes: command attempts to ... 1 input text line longer than 80 bytes: creates APT\*(Aqs pa... 1 input text line longer than 80 bytes: depends\&. Causes on... 1 input text line longer than 80 bytes: displays all the sou... 1 input text line longer than 80 bytes: displays information... 1 input text line longer than 80 bytes: displays some statis... 1 input text line longer than 80 bytes: does not manipulate ... 1 input text line longer than 80 bytes: e\&.g\&. expresses i... 1 input text line longer than 80 bytes: files as well as sou... 1 input text line longer than 80 bytes: is given then the lo... 1 input text line longer than 80 bytes: is meant to help deb... 1 input text line longer than 80 bytes: is specified, only t... 1 input text line longer than 80 bytes: is the number of dep... 4 input text line longer than 80 bytes: is the number of pac... 1 input text line longer than 80 bytes: is the number of reg... 1 input text line longer than 80 bytes: madison, it can only... 1 input text line longer than 80 bytes: madison\&. It displa... 1 input text line longer than 80 bytes: package\&. The resul... 1 input text line longer than 80 bytes: performs a full text... 1 input text line longer than 80 bytes: print all dependenci... 1 input text line longer than 80 bytes: print all names, inc... 1 input text line longer than 80 bytes: print only dependenc... 1 input text line longer than 80 bytes: shows a listing of e... 1 input text line longer than 80 bytes: shows a short listin... 1 input text line longer than 80 bytes: takes a list of pack... 1 input text line longer than 80 bytes: to set the quietness... 1 input text line longer than 80 bytes: versions is the numb... 1 input text line longer than 80 bytes: works independently ... 7 skipping paragraph macro: PP after SH -.-. Output from "test-groff -mandoc -t -ww -z apt-cache.8": (shortened list) 3 trailing space in the line Remove trailing space with: sed -e 's/ *$//' -.-. Show if docman-to-man created this. Who is actually creating this man page? Debian or upstream? Is the generating software out of date? 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 3 -.-. 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) 548 \%https://www.rw.cdl.uni-saarland.de/people/sander/private/html/gsvcg1.html -.-. Wrong distance 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. N.B. The number of lines affected can be too large to be in a patch. Lines with only one (or two) space(s) between sentences could be split, so latter sentences begin on a new line. [List of affected lines is removed] -.-. No need for "\&" to be in front of a period (.), if there is a character in front of it Remove with "sed -e 's/\\&\././g'" [List with 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. 10:.TH "APT\-CACHE" "8" "14\ \&March\ \&2024" "APT 2.9.29" "APT" 30:.SH "NAME" 32:.SH "SYNOPSIS" 35:.SH "DESCRIPTION" 295:.SH "OPTIONS" 484:.SH "FILES" 519:.SH "DIAGNOSTICS" 523:.SH "BUGS" 530:.SH "AUTHORS" 539:.SH "NOTES" -.-. Use ".na" (no adjustment) instead of ".ad l" (and ".ad" to begin the same adjustment again as before). 26:.ad l -.-. Output from "test-groff -mandoc -t -K utf8 -rF0 -rHY=0 -rCHECKSTYLE=10 -ww -z ": troff:<stdin>:69: warning: trailing space in the line troff:<stdin>:75: warning: trailing space in the line troff:<stdin>:76: warning: trailing space in the line -.-. Generally: Split (sometimes) lines after a punctuation mark; before a conjunction.
--- apt-cache.8 2025-02-21 21:31:58.237105540 +0000 +++ apt-cache.8.new 2025-02-21 23:03:24.171951510 +0000 @@ -7,7 +7,7 @@ .\" Source: APT 2.9.29 .\" Language: English .\" -.TH "APT\-CACHE" "8" "14\ \&March\ \&2024" "APT 2.9.29" "APT" +.TH APT\-CACHE 8 "14\ \&March\ \&2024" "APT 2.9.29" APT .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -23,17 +23,16 @@ .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) -.ad l +.na .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- -.SH "NAME" +.SH NAME apt-cache \- query the APT cache -.SH "SYNOPSIS" +.SH SYNOPSIS .HP \w'\fBapt\-cache\fR\ 'u \fBapt\-cache\fR [\fB\-agipns\fR] [\fB\-o=\fR\fB\fIconfig_string\fR\fR] [\fB\-c=\fR\fB\fIconfig_file\fR\fR] {gencaches | showpkg\ \fIpkg\fR... | showsrc\ \fIpkg\fR... | stats | dump | dumpavail | unmet | search\ \fIregex\fR... | show\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | depends\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | rdepends\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | pkgnames\ [\fIprefix\fR] | dotty\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | xvcg\ \fIpkg\fR\ [{=\fIpkg_version_number\fR\ |\ /\fItarget_release\fR}]... | policy\ [\fIpkg\fR...] | madison\ \fIpkg\fR... | {\-v\ |\ \-\-version} | {\-h\ |\ \-\-help}} -.SH "DESCRIPTION" -.PP +.SH DESCRIPTION \fBapt\-cache\fR performs a variety of operations on APT\*(Aqs package cache\&. \fBapt\-cache\fR @@ -66,14 +65,14 @@ would produce output similar to the foll .nf Package: libreadline2 Versions: 2\&.1\-12(/var/state/apt/lists/foo_Packages), -Reverse Depends: +Reverse Depends: libreadlineg2,libreadline2 libreadline2\-altdev,libreadline2 Dependencies: 2\&.1\-12 \- libc5 (2 5\&.4\&.0\-0) ncurses3\&.0 (0 (null)) Provides: -2\&.1\-12 \- -Reverse Provides: +2\&.1\-12 \- +Reverse Provides: .fi .if n \{\ .RE @@ -292,8 +291,7 @@ command attempts to mimic the output for madison\&. It displays available versions of a package in a tabular format\&. Unlike the original madison, it can only display information for the architecture for which APT has retrieved package lists (APT::Architecture)\&. .RE -.SH "OPTIONS" -.PP +.SH OPTIONS All command line options may be set using the configuration file, the descriptions indicate the configuration option to set\&. For boolean options you can override the config file by using something like \fB\-f\-\fR,\fB\-\-no\-f\fR, \fB\-f=no\fR @@ -481,8 +479,7 @@ configuration option and scope, see \fBapt.conf\fR(5) for information on that\&. .RE -.SH "FILES" -.PP +.SH FILES /etc/apt/sources\&.list .RS 4 Locations to fetch packages from\&. Configuration Item: @@ -510,33 +507,25 @@ Dir::State::Lists (partial will be implicitly appended) .RE -.SH "SEE ALSO" -.PP +.SH SEE ALSO \fBapt.conf\fR(5), \fBsources.list\fR(5), \fBapt-get\fR(8), \fBapt-patterns\fR(7) -.SH "DIAGNOSTICS" -.PP +.SH DIAGNOSTICS \fBapt\-cache\fR returns zero on normal operation, decimal 100 on error\&. -.SH "BUGS" -.PP +.SH BUGS \m[blue]\fBAPT bug page\fR\m[]\&\s-2\u[3]\d\s+2\&. If you wish to report a bug in APT, please see /usr/share/doc/debian/bug\-reporting\&.txt or the \fBreportbug\fR(1) command\&. -.SH "AUTHORS" -.PP +.SH AUTHORS \fBJason Gunthorpe\fR -.RS 4 -.RE .PP \fBAPT team\fR -.RS 4 -.RE -.SH "NOTES" +.SH NOTES .IP " 1." 4 GraphViz .RS 4 @@ -545,7 +534,7 @@ GraphViz .IP " 2." 4 VCG tool .RS 4 -\%https://www.rw.cdl.uni-saarland.de/people/sander/private/html/gsvcg1.html +\%https://www.rw.cdl.uni-saarland.de/\:people/\:sander/\:private/\:html/\:gsvcg1.html .RE .IP " 3." 4 APT bug page
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> The same goes for man pages that are used as an input. For a style guide use mandoc -T lint -.- 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) -.-