Bug 1728637

Summary: history undo is confused by multilib operations
Product: [Fedora] Fedora Reporter: Kamil Páral (Red Hat) <kparal>
Component: dnfAssignee: Daniel Mach <dmach>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: dmach, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.2.11-2.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-10 16:56:06 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:
Embargoed:

Description Kamil Páral (Red Hat) 2019-07-10 10:39:09 UTC
Description of problem:
I downgraded a multilib package (gtk3). I wanted to revert the upgrade, but "history undo last" only acts on one of the affected architectures (i686) and ignores the other (x86_64).

$ sudo dnf downgrade gtk3 gtk3.i686
Last metadata expiration check: 0:08:39 ago on Wed 10 Jul 2019 12:25:09 PM CEST.
Dependencies resolved.
================================================================================
 Package       Architecture    Version                   Repository        Size
================================================================================
Downgrading:
 gtk3          i686            3.24.9-1.fc30             updates          4.8 M
 gtk3          x86_64          3.24.9-1.fc30             updates          4.5 M

Transaction Summary
================================================================================
Downgrade  2 Packages

Total download size: 9.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): gtk3-3.24.9-1.fc30.x86_64.rpm             38 MB/s | 4.5 MB     00:00    
(2/2): gtk3-3.24.9-1.fc30.i686.rpm               35 MB/s | 4.8 MB     00:00    
--------------------------------------------------------------------------------
Total                                            10 MB/s | 9.3 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Downgrading      : gtk3-3.24.9-1.fc30.x86_64                              1/4 
  Downgrading      : gtk3-3.24.9-1.fc30.i686                                2/4 
  Cleanup          : gtk3-3.24.10-1.fc30.i686                               3/4 
  Cleanup          : gtk3-3.24.10-1.fc30.x86_64                             4/4 
  Running scriptlet: gtk3-3.24.10-1.fc30.x86_64                             4/4 
  Running scriptlet: gtk3-3.24.9-1.fc30.x86_64                              4/4 
  Verifying        : gtk3-3.24.9-1.fc30.i686                                1/4 
  Verifying        : gtk3-3.24.10-1.fc30.i686                               2/4 
  Verifying        : gtk3-3.24.9-1.fc30.x86_64                              3/4 
  Verifying        : gtk3-3.24.10-1.fc30.x86_64                             4/4 

Downgraded:
  gtk3-3.24.9-1.fc30.i686               gtk3-3.24.9-1.fc30.x86_64              

Complete!


$ sudo dnf history undo last
Last metadata expiration check: 0:08:52 ago on Wed 10 Jul 2019 12:25:09 PM CEST.
Undoing transaction 401, from Wed 10 Jul 2019 12:33:52 PM CEST
    Downgrade  gtk3-3.24.9-1.fc30.i686    @updates
    Downgraded gtk3-3.24.10-1.fc30.i686   @@System
    Downgrade  gtk3-3.24.9-1.fc30.x86_64  @updates
    Downgraded gtk3-3.24.10-1.fc30.x86_64 @@System
Dependencies resolved.
================================================================================
 Package      Architecture Version                Repository               Size
================================================================================
Upgrading:
 gtk3         i686         3.24.10-1.fc30         updates-testing         4.8 M

Transaction Summary
================================================================================
Upgrade  1 Package

Total download size: 4.8 M
Is this ok [y/N]:
(... and then it fails because of file conflicts, which is expected at this point)



Version-Release number of selected component (if applicable):
dnf-4.2.5-2.fc30.noarch

How reproducible:
seems 100%

Steps to Reproduce:
1. install gtk3.x86_64 gtk3.i686
2. downgrade gtk3.x86_64 gtk3.i686
3. dnf history undo last
4. see that only gtk3.i686 is being updated

Expected results:
history undo operation should be performed on all packages from that history even, including multilib packages

Comment 2 Fedora Update System 2019-10-02 10:43:05 UTC
FEDORA-2019-049b4836a6 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-049b4836a6

Comment 3 Fedora Update System 2019-10-03 01:52:41 UTC
dnf-4.2.11-2.fc30, dnf-plugins-core-4.0.10-1.fc30, libdnf-0.35.5-2.fc30, librepo-1.10.6-1.fc30 has been pushed to the Fedora 30 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-2019-049b4836a6

Comment 4 Fedora Update System 2019-10-10 16:56:06 UTC
dnf-4.2.11-2.fc30, dnf-plugins-core-4.0.10-1.fc30, libdnf-0.35.5-2.fc30, librepo-1.10.6-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.