dnf install custom rpm - dnf upgrade

Jan Zelený jzeleny at redhat.com
Mon Oct 12 10:30:42 UTC 2015


On 12. 10. 2015 at 12:04:00, arnaud gaboury wrote:
> I built my own .rpm's for a meta package. These packages are only a
> modification of an existing Fedora package. Before I installed my own
> packages, I first removed the original version from Fedora.
> 
> Thus now $ dnf list installed return correctly:
> Software     version-MyBuild.fc22.1
> 
> When doing a system upgrade, dnf want to install the original Fedora
> version: Software-version.fc22.1

I guess the official Fedora package was upgraded in remote repos and was 
therefore selected as an upgrade of your package. This happens if both 
packages have the same name.

> Is there a way to change somewhere this behavior? Why dnf want to
> upgrade a package which is not installed? I guess one solution would
> be to give a different name for my own tweak rpm, but I thought
> changing only versisoning would be enough. Another solution would be
> to ignore these packages. Is there a clean and recommended way to
> avoid dnf to upgrade these customs rpm's ?

You basically have two options to do what you need:

1) Rename the package [1]
2) Bump the epoch so that the EVR of your custom package is always higher than 
the official one

However, both of these options have some potential implications for stability 
of your system and you should know what are you doing before choosing one of 
them.

[1] 
http://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages

Jan


More information about the users mailing list