I was playing around with texlive
package recently and found out that there is a way to install tex style packages with yum install 'tex(package.sty)'
command. I've never seen package name was specified like that before. Skimming through yum man page didn't yield relevant information.
After some googling I found mentions of possibility of installing Perl modules in a similar fashion, e.g. yum install 'perl(Net::Telnet)'
. Though it didn't work for me.
Can someone please provide more information on this type of specifying package name with yum? Are there other packages (besides tex) modules for which can be installed in a similar way? Can I get a list of such packages on my system? Is this an extra functionality that is added to yum as a plugin during installation of a corresponding package (texlive
in this case)?
Linux Distro: CentOS 7
Best Answer
The packages
perl(Net::Telnet)
are what are called virtual packages. They exist only in name and are essentially an "alias" for the real package whose name is reallyperl-Net-Telnet
.These packages come into existence through their definition within the
.spec
file as provides or requires. You can see some here in this package,perl-Net-HTTP
:The advantage of specifying the package names like this is that dependencies do not have to rely on specific version numbers. Here a dependency can say, "I only need any old version of X".
NOTE: These names only work when doing a
yum install 'perl(X)'
they do not work withyum search
oryum info
, for example. If you take a look at theyum
man page it discusses the true names of packages that are guaranteed to work with all of YUM's commands in the "SPECIFYING PACKAGE NAMES" section.How else can you tell?
If you attempt to do an install of one of these and enable
yum
's verbose messaging you'll see hints:Notice the mentions of "virtual provide" and "file-provide"? These are the dependency engine in
yum
looking for packages that "provide" what you specified in name, i.e.perl(Net::HTTP)
, on other packages looking for matches.You can also lean on
repoquery
to show you this relationship as well:References