Bug 1415700 - ovirt-release leaves repo files behind after removal
Summary: ovirt-release leaves repo files behind after removal
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-release
Classification: oVirt
Component: General
Version: 4.0.1
Hardware: Unspecified
OS: Linux
low
low vote
Target Milestone: ovirt-4.3.0
: ---
Assignee: Yuval Turgeman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-23 13:17 UTC by Evgheni Dereveanchin
Modified: 2018-06-25 07:32 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-25 07:32:35 UTC
oVirt Team: Integration
rule-engine: ovirt-4.3+


Attachments (Terms of Use)

Description Evgheni Dereveanchin 2017-01-23 13:17:05 UTC
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

Comment 1 Yuval Turgeman 2017-07-16 11:00:10 UTC
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 ?

Comment 2 Sandro Bonazzola 2017-09-04 13:10:14 UTC
I'm not sure config(noreplace) is the best one here. Looks like ghost is fitting better for the required use case.

Comment 3 Yaniv Lavi 2018-06-25 07:32:35 UTC
Closing old bugs.
Please reopen if still relevant.
Patches are welcomed.


Note You need to log in before you can comment on or make changes to this bug.