Read a Changelog From an RPM File

The internet is full of tips on how to read the changelog from an RPM package you have installed.

How do you read the changelog from a .rpm file before you install it?

The answer is amazingly simple:

rpm -q --changelog -p /path/to/file.rpm

Anything you can query from an installed package with rpm -q you can query from a file with -p.

So why is the answer hard so to find? Because the rpm man page describes -p,--package PACKAGE_FILE under select-options, but leaves it out under query-options.

The fact that there is a curly brace where there should be a square bracket tells me the maintainers of this man page don’t actually use it.

[PACKAGE_NAME] [-a,--all] [-f,--file FILE]
[-g,--group GROUP] {-p,--package PACKAGE_FILE]
[--fileid MD5] [--hdrid SHA1] [--pkgid MD5] [--tid TID]
[--querybynumber HDRNUM] [--triggeredby PACKAGE_NAME]
[--whatprovides CAPABILITY] [--whatrequires CAPABILITY]

[--changelog] [-c,--configfiles] [-d,--docfiles] [--dump]
[--filesbypkg] [-i,--info] [--last] [-l,--list]
[--provides] [--qf,--queryformat QUERYFMT]
[-R,--requires] [--scripts] [-s,--state]

Did you catch that?

Under select-options {-p,–package PACKAGE_FILE] should read [-p,–package PACKAGE_FILE] and the package flag should be under query-options as well.

You can file the bug report. I have work to do.

Did you find this post useful or have questions or comments? Please let me know!

This entry was posted in How Tos, linux, rpm. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *