Yum: Can a package have a alias or short name?

Rubans asked:

I have installed yum package "mysql" previously using :

yum install mysql

However when I try and list installed packages using filter:

yum list install *mysql"

It shows nothing but when I list installed packages without I can see package names which I believe is what my mysql installed:

mariadb.x86_64                                                                            1:5.5.65-1.el7                                                        @gl
mariadb-libs.x86_64                                                                       1:5.5.65-1.el7

Does yum have a concept of short names or aliases? just trying to understand how mysql maps to mariadb.exe and have googled various resources but didn’t find anything obvious.

My answer:


RPM packages can declare Provides: which mean that they provide some named capability. These are treated as equivalent to package names when yum decides what packages to install.

A recent version of the mariadb package does indeed declare several provides:

$ rpm -q --provides mariadb
config(mariadb) = 3:10.4.13-2.fc32
mariadb = 3:10.4.13-2.fc32
mariadb(x86-64) = 3:10.4.13-2.fc32
mysql = 3:10.4.13-2.fc32
mysql(x86-64) = 3:10.4.13-2.fc32
mysql-compat-client = 3:10.4.13-2.fc32
mysql-compat-client(x86-64) = 3:10.4.13-2.fc32

Packages can also declare Obsoletes: which are packages that the current package replaces. (Though this package doesn’t declare any.) If a package with the old name is already installed, running yum upgrade will replace the old package with the new one.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.