Bug 1465292 - DNF remove protected duplicate package
Summary: DNF remove protected duplicate package
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1486137 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-27 06:48 UTC by Lari Tanase
Modified: 2017-10-04 22:26 UTC (History)
7 users (show)

Fixed In Version: dnf-2.7.2-1.fc27 dnf-2.7.2-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-04 14:24:24 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lari Tanase 2017-06-27 06:48:05 UTC
Description of problem:
dnf fails to remove "protected" packages

as an example
systemd-0:231-10.fc25.x86_64 systemd-libs-0:231-10.fc25.x86_64 systemd-pam-0:231-10.fc25.x86_64 systemd-udev-0:231-10.fc25.x86_64

Version-Release number of selected component (if applicable):

dnf.noarch                         1.1.10-3.fc25                          @anaconda
dnf.noarch                         1.1.10-6.fc25                          @System  

How reproducible:

each time

Steps to Reproduce:
1. install a fresh copy of fedora
2. during update find a way to freeze the update (my Asus UX501VW did this at first update because I didn't "mend" the grub options with acpi_backlight=native acpi_osi=! acpi_osi='Windows 2009')
3. now I have a bunch of duplicates


Actual results:
lots of duplciates
while the "non protected ones" can be removed, the protected ones no

Expected results:
is there are duplicate df should remove older versions

Additional info:

Comment 1 Lari Tanase 2017-06-27 06:59:01 UTC
I have found a way to circumvent this

you need to add --disableplugin=protected_packages this for specific packages 

BE CAREFULL TO USE FULL VERSION OF OLD PACKAGES 

as here

dnf.noarch-1.1.10-3.fc25
dnf.noarch-1.1.10-6.fc25
systemd-0:231-10.fc25.x86_64
systemd-0:231-15.fc25.x86_64
systemd-libs-0:231-10.fc25.x86_64
systemd-libs-0:231-15.fc25.x86_64
systemd-pam-0:231-10.fc25.x86_64
systemd-pam-0:231-15.fc25.x86_64
systemd-udev-0:231-10.fc25.x86_64
systemd-udev-0:231-15.fc25.x86_64


you issue

sudo dnf remove --disableplugin=protected_packages dnf.noarch-1.1.10-3.fc25 systemd-0:231-10.fc25.x86_64 systemd-libs-0:231-10.fc25.x86_64 systemd-pam-0:231-10.fc25.x86_64 systemd-udev-0:231-10.fc25.x86_64

Comment 2 srakitnican 2017-07-03 10:07:58 UTC
So after a failed upgrade I am left to remove all the dupes, --disableplugin=protected_packages however for some reason does not have an effect for me.

$ rpm -q dnf
dnf-2.4.1-1.fc26.noarch
dnf-2.5.1-1.fc26.noarch
$ sudo dnf --disableplugin=protected_packages remove dnf-2.5.1-1.fc26.noarch
Error: 
 Problem: The operation would result in removing the following protected packages: dnf

Comment 3 srakitnican 2017-07-03 11:01:12 UTC
Since my is a different issue, I've opened different bug #1467304 .

Comment 4 Jaroslav Mracek 2017-08-01 14:26:01 UTC
I would like to provide some improvement, but first I have to brake my system to have testing environment for development.

Comment 5 Jaroslav Mracek 2017-08-01 16:50:45 UTC
I created a patch that enhance ``remove --duplicates``.  It even allows to remove duplicated protected packages if the newest is available (https://github.com/rpm-software-management/dnf/pull/880). The new implementation also installs missing dependencies of the newest package.

Comment 6 Jaroslav Mracek 2017-08-30 18:43:33 UTC
*** Bug 1486137 has been marked as a duplicate of this bug. ***

Comment 7 Fedora Update System 2017-10-02 10:36:17 UTC
dnf-plugins-extras-2.0.3-1.fc27 dnf-plugins-core-2.1.4-1.fc27 dnf-2.7.2-1.fc27 libdnf-0.10.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-faf235c683

Comment 8 Fedora Update System 2017-10-02 10:38:45 UTC
dnf-plugins-extras-2.0.3-1.fc26 dnf-plugins-core-2.1.4-1.fc26 dnf-2.7.2-1.fc26 libdnf-0.10.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-70a8618065

Comment 9 Fedora Update System 2017-10-02 20:29:21 UTC
dnf-2.7.2-1.fc26, dnf-plugins-core-2.1.4-1.fc26, dnf-plugins-extras-2.0.3-1.fc26, libdnf-0.10.1-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-70a8618065

Comment 10 Fedora Update System 2017-10-02 21:28:32 UTC
dnf-2.7.2-1.fc27, dnf-plugins-core-2.1.4-1.fc27, dnf-plugins-extras-2.0.3-1.fc27, libdnf-0.10.1-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-faf235c683

Comment 11 Fedora Update System 2017-10-04 14:24:24 UTC
dnf-2.7.2-1.fc27, dnf-plugins-core-2.1.4-1.fc27, dnf-plugins-extras-2.0.3-1.fc27, libdnf-0.10.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2017-10-04 22:26:16 UTC
dnf-2.7.2-1.fc26, dnf-plugins-core-2.1.4-1.fc26, dnf-plugins-extras-2.0.3-1.fc26, libdnf-0.10.1-1.fc26 has been pushed to the Fedora 26 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.