Bug 1061780 - Dnf allows installing conflicting packages
Summary: Dnf allows installing conflicting packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-05 15:48 UTC by Richard Marko
Modified: 2016-02-01 02:23 UTC (History)
9 users (show)

Fixed In Version: dnf-plugins-core-0.0.8-2.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-31 23:58:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard Marko 2014-02-05 15:48:23 UTC
Description of problem:
ssia

Version-Release number of selected component (if applicable):
dnf-0.4.12-1.fc20.noarch

How reproducible:
Always

Steps to Reproduce:
0. x86_64
1. dnf install python3 (installs 64bit version)
2. dnf install python3-3.3.2-8.fc20.i686


Actual results:
32bit version installed.

Expected results:
Conflict error.

Additional info:
Same with dnf install /usr/bin/python3

Comment 1 Panu Matilainen 2014-02-06 06:36:03 UTC
Indeed...

[root@localhost ~]# rpm -q python3
python3-3.3.2-8.fc20.x86_64
[root@localhost ~]# rpm -Uvh /tmp/python3-3.3.2-8.fc20.i686.rpm 
Preparing...                          ################################# [100%]
	file /usr/bin/python3.3 from install of python3-3.3.2-8.fc20.i686 conflicts with file from package python3-3.3.2-8.fc20.x86_64
	file /usr/bin/python3.3m from install of python3-3.3.2-8.fc20.i686 conflicts with file from package python3-3.3.2-8.fc20.x86_64

Dnf appears to be enabling a whole lot of rpms problem filters by default, this is just wrong:

        self.rpm_probfilter = [rpm.RPMPROB_FILTER_OLDPACKAGE,
                               rpm.RPMPROB_FILTER_REPLACEPKG,
                               rpm.RPMPROB_FILTER_REPLACEOLDFILES]

rpm.RPMPROB_FILTER_OLDPACKAGE is only needed for downgrade but is not terribly harmful in itself. However REPLACEPKG and REPLACEOLDFILES should never be enabled except for the special case reinstalling a package in-place (eg to repair a damaged package)

Comment 2 Ales Kozumplik 2014-02-06 08:55:15 UTC
Yeah, legit bug. We'll fix this.

Comment 3 Honza Silhan 2014-03-26 15:39:00 UTC
Fixed in the upstream the way as Panu recommends. By default when installing specific package no flag filters are used. For downgrade and dist-sync -> rpm.RPMPROB_FILTER_OLDPACKAGE, for reinstallation and history undo/rollback operations -> rpm.RPMPROB_FILTER_REPLACEPKG and rpm.RPMPROB_FILTER_REPLACEOLDFILES are set.

Comment 4 Honza Silhan 2014-03-26 15:42:05 UTC
* the history commands can have set all of them based on sub-transaction type.

Comment 5 Panu Matilainen 2014-04-02 11:12:30 UTC
Actually... thinking about it a bit more, I dont think rpm.RPMPROB_FILTER_REPLACEOLDFILES should *ever* be set for any of these operations.

The only case it should be needed is when you're reinstalling a package whose contents have changed but NEVR has not. Which is of course NOT an actual reinstall of the same package but something else, and there's a reason rpm requires "nasty" switches (--force basically) for this operation.

Now there might of course be some other case I'm forgotting, but given how nasty rpm.RPMPROB_FILTER_REPLACEOLDFILES is, I'd suggest erring on the side of caution and simply dropping that one completely now, and reconsider if the need actually rises.

Comment 6 Fedora Update System 2014-05-02 08:31:56 UTC
dnf-0.5.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.5.1-1.fc20

Comment 7 Honza Silhan 2014-05-02 13:25:31 UTC
FYI rpm.RPMPROB_FILTER_REPLACEOLDFILES flag is removed in dnf-5.0.2.

Comment 8 Fedora Update System 2014-05-02 21:04:27 UTC
Package dnf-0.5.1-1.fc20, hawkey-0.4.14-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.5.1-1.fc20 hawkey-0.4.14-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-5937/hawkey-0.4.14-1.fc20,dnf-0.5.1-1.fc20
then log in and leave karma (feedback).

Comment 9 lnie 2014-05-20 06:43:35 UTC
Tested with dnf-0.5.1-1.fc20 and hawkey-0.4.14-1.fc20,the bug is gone

Comment 10 Fedora Update System 2014-05-28 12:09:46 UTC
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20

Comment 11 Fedora Update System 2014-05-28 23:49:44 UTC
Package dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-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-plugins-core-0.0.8-2.fc20 libsolv-0.6.1-1.git6d968f1.fc20 hawkey-0.4.16-1.fc20 dnf-0.5.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6789/libsolv-0.6.1-1.git6d968f1.fc20,hawkey-0.4.16-1.fc20,dnf-0.5.2-1.fc20,dnf-plugins-core-0.0.8-2.fc20
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2014-05-31 23:58:16 UTC
dnf-plugins-core-0.0.8-2.fc20, libsolv-0.6.1-1.git6d968f1.fc20, hawkey-0.4.16-1.fc20, dnf-0.5.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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