Bug 1389280

Summary: "yum remove" prints erreneous Erase output when removing multiple packages versions of same package
Product: [Fedora] Fedora Reporter: lethalwp
Component: dnfAssignee: rpm-software-management
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 25CC: jmracek, jsilhan, lethalwp, mluscon, packaging-team-maint, pnemade, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 14:04:07 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 lethalwp 2016-10-27 11:02:23 UTC
Description of problem:

when yum (dnf) is removing the same package of multiple different versions, the output is wrong: it prints like it is removing several time the same package. (luckily he does the right thing.)


Here's a copy of the command + output, 
watch the "Erasing" lines that print three times 'kernel-devel-4.8.1-1.fc25.x86_64':


[root@little lethalwp]# yum remove kernel-devel-4.8.1-1.fc25.x86_64 kernel-devel-4.8.2-300.fc25.x86_64 kernel-devel-4.8.3-300.fc25.x86_64
Redirecting to '/usr/bin/dnf remove kernel-devel-4.8.1-1.fc25.x86_64 kernel-devel-4.8.2-300.fc25.x86_64 kernel-devel-4.8.3-300.fc25.x86_64' (see 'man yum2dnf')

Dependencies resolved.
==============================================================================================================================================================================================================================================================
 Package                                                      Arch                                                   Version                                                           Repository                                                        Size
==============================================================================================================================================================================================================================================================
Removing:
 kernel-devel                                                 x86_64                                                 4.8.1-1.fc25                                                      @updates-testing                                                  40 M
 kernel-devel                                                 x86_64                                                 4.8.2-300.fc25                                                    @updates-testing                                                  40 M
 kernel-devel                                                 x86_64                                                 4.8.3-300.fc25                                                    @updates-testing                                                  40 M

Transaction Summary
==============================================================================================================================================================================================================================================================
Remove  3 Packages

Installed size: 121 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing     : kernel-devel-4.8.1-1.fc25.x86_64                                                                                                                                                                                                          1/3 
  Erasing     : kernel-devel-4.8.1-1.fc25.x86_64                                                                                                                                                                                                          2/3 
  Erasing     : kernel-devel-4.8.1-1.fc25.x86_64                                                                                                                                                                                                          3/3 
  Verifying   : kernel-devel-4.8.3-300.fc25.x86_64                                                                                                                                                                                                        1/3 
  Verifying   : kernel-devel-4.8.1-1.fc25.x86_64                                                                                                                                                                                                          2/3 
  Verifying   : kernel-devel-4.8.2-300.fc25.x86_64                                                                                                                                                                                                        3/3 

Removed:
  kernel-devel.x86_64 4.8.1-1.fc25                                                   kernel-devel.x86_64 4.8.2-300.fc25                                                   kernel-devel.x86_64 4.8.3-300.fc25                                                  

Complete!

Comment 1 Honza Silhan 2016-10-31 12:12:40 UTC
can you please share the your version of DNF? (rpm -q dnf). It should have been fixed in DNF-2.0. You can try it installing from rawhide if you want to test it.

Comment 2 lethalwp 2016-11-04 08:55:29 UTC
I tested it with the latest fedora 25 version:
dnf-1.1.10-3.fc25.noarch

You may close this bug if it is fixed in next release
Thank you.

Comment 3 Jaroslav Mracek 2016-11-07 14:04:07 UTC
The bug is fixed in dnf-2.0 that will be released in Fedora 26+. The testing version can be installed from copr repo rpmsoftwaremanagemet/dnf-nightly ('dnf copr enable rpmsoftwaremanagement/dnf-nightly').