Description of problem: According to documentation, old release RPMs should be removed after upgrade, however config files are left behind causing duplicate repo definitions. Version-Release number of selected component (if applicable): ovirt-release36-3.6.7-1.noarch How reproducible: always Steps to Reproduce: 1. Check release versions installed # rpm -qa | grep ovirt-release ovirt-release36-3.6.7-1.noarch ovirt-release40-4.0.6.1-1.noarch 2. check that file belongs to the release RPM # rpm -qf /etc/yum.repos.d/ovirt-3.6.repo ovirt-release36-3.6.7-1.noarch 3. remove release RPM yum remove ovirt-release36 Actual results: repo files still in place # rpm -qf /etc/yum.repos.d/ovirt-3.6.repo file /etc/yum.repos.d/ovirt-3.6.repo is not owned by any package Expected results: repo files removed together with RPM # rpm -qf /etc/yum.repos.d/ovirt-3.6.repo error: file /etc/yum.repos.d/ovirt-3.9.repo: No such file or directory Additional info: Same happens to 4.0 release file, easy to test on a CentOS box: 1) # yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm 2) # rpm -qf /etc/yum.repos.d/ovirt-4.0.repo ovirt-release40-4.0.6.1-1.noarch 3) # yum remove ovirt-release40 4) # rpm -qf /etc/yum.repos.d/ovirt-4.0.repo file /etc/yum.repos.d/ovirt-4.0.repo is not owned by any package
We use both %ghost and %config(noreplace), this can't be achieved with both directives, we need to select one. Using ghost only, would mean having the exact repo files that we need (no 0 size repo files) that would be removed with 'rpm -e'. Using noreplace by itself, would mean having some empty repo files, rpm -V fails on the files that were changed, and rpm -e saves the files with '.rpmsave'. The standard for yum repo files is config(noreplace), but is it the best solution in this case also ?
I'm not sure config(noreplace) is the best one here. Looks like ghost is fitting better for the required use case.
Closing old bugs. Please reopen if still relevant. Patches are welcomed.