Why Does the Repoquery Command Return Incorrect Information When the %{Size:M} Flag Is Used?

Problem scenario
You ran this command:  sudo repoquery openssl* --qf "%{name} %{size:m}"

You saw the following:

openssl 492 M
openssl-devel 1542 M
openssl-devel 1542 M
openssl-libs 991 M
openssl-libs 1221 M
openssl-perl 70.3 M
openssl-pkcs11 54.3 M
openssl-static 1068 M
openssl-static 1268 M
openssl098e 803 M
openssl098e 793 M

You know that the openssl packages are not this size.

The command "repoquery --version" returns this: "Repoquery version 0.0.11"

What should you do about the incorrect sizes of the packages you check with the repoquery command?  Or why do RPM packages look to be so big?

Solution
Use this command instead:

sudo repoquery openssl* --qf "%{name} %{size:h}"

You may want to use "yum info" if you do not trust openssl.

sudo yum info openssl*

Root cause
We suspect this is a bug.  The numeric values and lowercase "k" and uppercase "M" seem accurate with the ":h" flag and our cross-reference with the "yum info" command's results.  Here is an example of the output of the above repoquery command but with the ":h" flag:

[jdoe@goodserver ~]$ sudo repoquery openssl* --qf "%{name} %{size:h}"
openssl 492 k
openssl-devel 1.5 M
openssl-devel 1.5 M
openssl-libs 991 k
openssl-libs 1.2 M
openssl-perl 70 k
openssl-pkcs11 54 k
openssl-static 1.0 M
openssl-static 1.2 M
openssl098e 803 k
openssl098e 793 k

Additionally the man page of the repoquery command had this output:

"BUGS
       There  are  of  course  no bugs, but should you find any, you should first consult the FAQ section on http://yum.baseurl.org/wiki/Faq and if unsuccessful in finding a resolution contact the mailing list: yum-devel@lists.baseurl.org.  

To file a bug use  http://bugzilla.redhat.com  for  Fedora/RHEL/Centos  related bugs and http://yum.baseurl.org/report for all other bugs.

Panu Matilainen                                                           17 October 2005  "

We think that in 2018 we have discovered a bug.

Leave a comment

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