[Rpm-maint] [rpm-software-management/rpm] Correct and update Query formats documentation (#827)

Panu Matilainen notifications at github.com
Mon Sep 9 11:15:40 UTC 2019

pmatilai requested changes on this pull request.

A welcome update, but lets make it really count. Please address the individual comments.

> @@ -136,6 +135,8 @@ readable format in SI resp IEC 80000 standard.
 humansi uses 1K = 1000, 1M = 1000000, ...
 humaniec uses 1K = 1024, 1M = 1048576, ...
+The formatting tags are listed in lib/formats.c in structure headerFmt_s.

Source code is not user documentation and should not be linked as such. The formats are documented in rpm (8) manual in the QUERY OPTIONS section.

> @@ -153,10 +154,10 @@ braces.
 \section queryformat_example Example: Viewing the Verify Flags
-The following example query is run against dev because I know %verify
-is used there.
+The following example query is run against nss because %verify is used

I agree the old sentence is pretty bad, but this is not much of an improvement. "nss" doesn't go by that name everywhere, the packaging details such as the name and use of %verify are highly distro specific. These days, "systemd" might well be the most ubiquitous name there is, but that doesn't make %verify flags any less distro specific.

>  \verbatim
-	rpm -q --qf '[%{filenames} %{fileverifyflags}\n]' dev
+	rpm -q --qf '[%{FILENAMES} %{FILEVERIFYFLAGS:hex}\n]' nss

To really improve this example, I'd suggest using something else than FILEVERIFYFLAGS for the data. FILEMODES:octal might be a better example as all packages with files have them, and the values are commonly known, so you could delete the rpmfiles.h reference and values from the document too.

> @@ -90,11 +89,11 @@ grep or awk). If you try the obvious,
     rpm -q --queryformat "[%{NAME} %{FILENAMES}\n]" cdp

While we're updating package names, here's another candidate. Even I don't remember what "cdp" used to do :D

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20190909/b66b7e89/attachment-0001.html>

More information about the Rpm-maint mailing list