0
votes

I have installed a rpm package builded by myself whichs depends on php-common. Now, I need to install a new php-common version. Since it will remove php-common (current version) yum is telling me to remove my rpm-package. I don't want to remove this package since I already know it will not be any problem with the new php-common version. How can I avoid yum to remove o check for dependencies on my rpm package?

An example of what I'm doing:

Installed packages:
mypackage.rpm (require php-common)
php-common.rpm

When installing php56w-common it says it conflicts with php-common.rpm which I can not remove because it will try to remove also mypackage.rpm. I would like to remove php-common.rpm but keep installed (even with broken dependencies) mypackage.rpm

1

1 Answers

0
votes

There is no way to do this with yum. Correct way to do this would be to rebuild mypackage.rpm to have a requirement that both php-common and php56w-common provide.

If you do rpm -q --provides php-common, you would see a list of names that this package provides, find the same thing for php56w-common and use

 Requires: <name>

in mypackage.rpm when you build it.

If the above is out of reach, then one can try using rpm cmdline. Remove php-common forcefully and install php56w-common.

$ rpm -q php-common  # This finds the name of the package installed on the system
$ rpm -e --nodeps <name>
$ rpm -ivh php56w-common.rpm  # php56w-common.rpm needs to be present on disk.