Bug 1061780 - Dnf allows installing conflicting packages
Dnf allows installing conflicting packages
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Honza Silhan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-05 10:48 EST by Richard Marko
Modified: 2016-01-31 21:23 EST (History)
9 users (show)

See Also:
Fixed In Version: dnf-plugins-core-0.0.8-2.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-05-31 19:58:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard Marko 2014-02-05 10:48:23 EST
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 01:36:03 EST
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 03:55:15 EST
Yeah, legit bug. We'll fix this.
Comment 3 Honza Silhan 2014-03-26 11:39:00 EDT
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 11:42:05 EDT
* the history commands can have set all of them based on sub-transaction type.
Comment 5 Panu Matilainen 2014-04-02 07:12:30 EDT
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 04:31:56 EDT
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 09:25:31 EDT
FYI rpm.RPMPROB_FILTER_REPLACEOLDFILES flag is removed in dnf-5.0.2.
Comment 8 Fedora Update System 2014-05-02 17:04:27 EDT
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 02:43:35 EDT
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 08:09:46 EDT
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 19:49:44 EDT
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 19:58:16 EDT
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.