Bug 1017278

Summary: dnf does not notice file conflicts
Product: [Fedora] Fedora Reporter: Michal Schmidt <mschmidt>
Component: dnfAssignee: Ales Kozumplik <akozumpl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, jzeleny, pnemade, rholy
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.4.4-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-10 06:59:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Michal Schmidt 2013-10-09 14:37:33 UTC
Description of problem:
dnf does not notice a file conflict and proceeds with rpm installation, overwriting the conflicting file.

Version-Release number of selected component (if applicable):
dnf-0.4.3-2.fc20.noarch
hawkey-0.4.2-1.git4c51f65.fc20.x86_64
librepo-1.2.1-1.fc20.x86_64
rpm-4.11.1-7.fc20.x86_64

How reproducible:
always

Steps to Reproduce:
1. dnf install libgudev1-devel-208-2.fc20.i686 libgudev1-devel-208-2.fc20.x86_64
2.
3.

Actual results:
Installation succeeds even though the two RPMs have a file conflict (reported in bug 1016834).
Afterwards, "rpm -V libgudev1-devel" reports:
..5......  d /usr/share/gtk-doc/html/gudev/annotation-glossary.html
..5......  d /usr/share/gtk-doc/html/gudev/index.sgml

Expected results:
The transaction check should detect the file conflict and not proceed with the installation.

Additional info:
yum detects the conflict like this:

Running transaction check
Running transaction test


Transaction check error:
  file /usr/share/gtk-doc/html/gudev/annotation-glossary.html conflicts between attempted installs of libgudev1-devel-208-2.fc20.x86_64 and libgudev1-devel-208-2.fc20.i686
  file /usr/share/gtk-doc/html/gudev/index.sgml conflicts between attempted installs of libgudev1-devel-208-2.fc20.x86_64 and libgudev1-devel-208-2.fc20.i686

Comment 1 Ales Kozumplik 2013-10-10 09:16:40 UTC
Hello, thanks for the report. It's odd, will take a look.

Comment 2 Ales Kozumplik 2013-10-10 12:22:38 UTC
Fixed by fa2c5cf, will be included in dnf-0.4.4.

Comment 3 Michal Schmidt 2013-10-10 12:32:04 UTC
I applied the one-liner from
  https://github.com/akozumpl/dnf/commit/fa2c5cfe3a4c98a6a0f3cbf9909058d52332c505
manually to:
  /usr/lib/python2.7/site-packages/dnf/yum/base.py 

I confirm it fixes the bug for me. dnf now says:

Running transaction check
Transaction check succeeded.
Running transaction test
Transaction check error:
  file /usr/share/gtk-doc/html/gudev/annotation-glossary.html conflicts between attempted installs of libgudev1-devel-208-2.fc20.i686 and libgudev1-devel-208-2.fc20.x86_64
  file /usr/share/gtk-doc/html/gudev/index.sgml conflicts between attempted installs of libgudev1-devel-208-2.fc20.i686 and libgudev1-devel-208-2.fc20.x86_64


I am amazed at how quickly the dnf/librepo bugs I report are getting fixed. Keep up the good work!

Comment 4 Fedora Update System 2013-10-14 16:27:01 UTC
dnf-0.4.4-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.4-1.fc20

Comment 5 Fedora Update System 2013-10-14 19:19:01 UTC
Package dnf-0.4.4-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.4-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19064/dnf-0.4.4-1.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-11-10 06:59:26 UTC
dnf-0.4.4-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.