iuscommunity/yum-plugin-replace — pull request #5 by andytson (2013-05-26 21:46:10+00:00)
Title: Check for counterparts using the original and new package sourcerpm name

I would like my guides that use this plugin to not have to install the package matching the base prefix.

This is because for example, running php-fpm and switching to php54-fpm would require installing httpd as part of the php package installation (as it's really mod_php sapi).

The same goes with mysql-server requiring mysql client installed.

Currently, if you don't use the base package, the plugin doesn't resolve the package upgrades of packages matching the base prefix if from another SRPM.

For example:

yum install php-cli php-pear
# causes an error because php isn't installed
yum replace php --replace-with php54
# removes php-pear and doesn't install the php54-pear package
yum replace php-common --replace-with php54-common

What I suggest, and have added to this pull request, is to resolve the source rpm name from it's filename, which works for most cases.

After (with the other pull request)

yum replace php-common --replace-with php54-common # replaces all php packages with php54 without needing the php base package installed

If there's any easier way of finding the source rpm name, then that'd be better, but this, along with my other pull request, should presumably work with all IUS packages as well as mine.