-2

I want to know how the yum info command works. I know yum info will display information about the installed package, but I really want to know which file it reads for that information.

Whether it's reading a file or it's reading from a database?

If from a file please tell me the file path.

If the database please tell me the path , table name.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
Premkumar
  • 113
  • 2

1 Answers1

6

yum info displays the RPM meta data which is included in every rpm package.

Depending on the exact arguments and the fact whether or not the package is locally installed, installed or available from a repository, the meta data comes directly from the rpm database, the repository repodata or alternatively is read directly from a .rpm-file.

When setting up a yum repository (with the createrepo command) a number of files with such meta data are generated, based on the rpm files in the repository. The (cached version of the) repodata/primary.xml may be the most relevant for the yum info output.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • 1
    The RPM database is stored under `/var/lib/rpm` in the form of Berkeley DB files and `primary.xml` is sometimes replaced with `xxxx...x-primary.sqlite.bz2`. – Cristian Ciupitu Oct 10 '14 at 13:24