Bug 1197531 - dnf downgrade *.rpm does not downgrade pkgs
Summary: dnf downgrade *.rpm does not downgrade pkgs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-02 00:39 UTC by Ben Boeckel
Modified: 2016-11-30 07:32 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-11-29 19:37:19 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
DNF debugdata for kernel downgrade attempt (8.21 MB, application/x-xz)
2015-04-09 01:24 UTC, Daniel Miranda
no flags Details

Description Ben Boeckel 2015-03-02 00:39:50 UTC
Description of problem:
dnf does not treat local downgrade files as a set, but rather individually, leading to errors:

# dnf downgrade *.rpm
Using metadata from Sat Feb 28 18:44:14 2015
Error: nothing provides glibc-headers = 2.21.90-3.fc23 needed by glibc-devel-2.21.90-3.fc23.x86_64.
package glibc-headers-2.21.90-3.fc23.x86_64 is not installable.
package nscd-2.21.90-3.fc23.x86_64 is not installable.
nothing provides glibc-headers = 2.21.90-3.fc23 needed by glibc-devel-2.21.90-3.fc23.x86_64
[root@bronto-burt boeckb]# ls *.rpm
glibc-devel-2.21.90-3.fc23.x86_64.rpm
glibc-2.21.90-3.fc23.x86_64.rpm
glibc-headers-2.21.90-3.fc23.x86_64.rpm
nscd-2.21.90-3.fc23.x86_64.rpm
glibc-common-2.21.90-3.fc23.x86_64.rpm

# yum downgrade *.rpm
Loaded plugins: auto-update-debuginfo, remove-with-leaves
Examining glibc-2.21.90-3.fc23.x86_64.rpm: glibc-2.21.90-3.fc23.x86_64
Examining glibc-common-2.21.90-3.fc23.x86_64.rpm: glibc-common-2.21.90-3.fc23.x86_64
Examining glibc-devel-2.21.90-3.fc23.x86_64.rpm: glibc-devel-2.21.90-3.fc23.x86_64
Examining glibc-headers-2.21.90-3.fc23.x86_64.rpm: glibc-headers-2.21.90-3.fc23.x86_64
Examining nscd-2.21.90-3.fc23.x86_64.rpm: nscd-2.21.90-3.fc23.x86_64
Resolving Dependencies
--> Running transaction check
---> Package glibc.x86_64 0:2.21.90-3.fc23 will be a downgrade
---> Package glibc.x86_64 0:2.21.90-3.fc23.1 will be erased
---> Package glibc-common.x86_64 0:2.21.90-3.fc23 will be a downgrade
---> Package glibc-common.x86_64 0:2.21.90-3.fc23.1 will be erased
---> Package glibc-devel.x86_64 0:2.21.90-3.fc23 will be a downgrade
---> Package glibc-devel.x86_64 0:2.21.90-3.fc23.1 will be erased
---> Package glibc-headers.x86_64 0:2.21.90-3.fc23 will be a downgrade
---> Package glibc-headers.x86_64 0:2.21.90-3.fc23.1 will be erased
---> Package nscd.x86_64 0:2.21.90-3.fc23 will be a downgrade
---> Package nscd.x86_64 0:2.21.90-3.fc23.1 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================================================================================================================================
 Package                                                                  Arch                                                              Version                                                                      Repository                                                                                       Size
===============================================================================================================================================================================================================================================================================================================================
Downgrading:
 glibc                                                                    x86_64                                                            2.21.90-3.fc23                                                               /glibc-2.21.90-3.fc23.x86_64                                                                     14 M
 glibc-common                                                             x86_64                                                            2.21.90-3.fc23                                                               /glibc-common-2.21.90-3.fc23.x86_64                                                             115 M
 glibc-devel                                                              x86_64                                                            2.21.90-3.fc23                                                               /glibc-devel-2.21.90-3.fc23.x86_64                                                              1.0 M
 glibc-headers                                                            x86_64                                                            2.21.90-3.fc23                                                               /glibc-headers-2.21.90-3.fc23.x86_64                                                            2.2 M
 nscd                                                                     x86_64                                                            2.21.90-3.fc23                                                               /nscd-2.21.90-3.fc23.x86_64                                                                     188 k

Transaction Summary
===============================================================================================================================================================================================================================================================================================================================
Downgrade  5 Packages

Total size: 132 M
Is this ok [y/d/N]:

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

Comment 1 Honza Silhan 2015-03-02 16:28:50 UTC
Thanks for the report. Can you try `dnf downgrade *.rpm --allowerasing`, `dnf install *.rpm` and post the output, please? I just want to know if with this switch it's working but this should be fixed anyway.

Comment 2 Ben Boeckel 2015-03-03 03:56:48 UTC
# dnf downgrade *.rpm --allowerasing
Using metadata from Sun Mar  1 17:45:15 2015
Package glibc-static not installed, cannot downgrade it.
Package glibc-utils not installed, cannot downgrade it.
Error: package nscd-2.21.90-3.fc23.1.x86_64 is not installable


# yum downgrade *.rpm
Loaded plugins: auto-update-debuginfo, remove-with-leaves
Examining glibc-2.21.90-3.fc23.1.x86_64.rpm: glibc-2.21.90-3.fc23.1.x86_64
Examining glibc-common-2.21.90-3.fc23.1.x86_64.rpm: glibc-common-2.21.90-3.fc23.1.x86_64
Examining glibc-devel-2.21.90-3.fc23.1.x86_64.rpm: glibc-devel-2.21.90-3.fc23.1.x86_64
Examining glibc-headers-2.21.90-3.fc23.1.x86_64.rpm: glibc-headers-2.21.90-3.fc23.1.x86_64
Examining glibc-static-2.21.90-3.fc23.1.x86_64.rpm: glibc-static-2.21.90-3.fc23.1.x86_64
No Match for available package: glibc-static-2.21.90-3.fc23.1.x86_64
Examining glibc-utils-2.21.90-3.fc23.1.x86_64.rpm: glibc-utils-2.21.90-3.fc23.1.x86_64
No Match for available package: glibc-utils-2.21.90-3.fc23.1.x86_64
Examining nscd-2.21.90-3.fc23.1.x86_64.rpm: nscd-2.21.90-3.fc23.1.x86_64
Resolving Dependencies
--> Running transaction check
---> Package glibc.x86_64 0:2.21.90-3.fc23.1 will be a downgrade
---> Package glibc.x86_64 0:2.21.90-4.fc23 will be erased
---> Package glibc-common.x86_64 0:2.21.90-3.fc23.1 will be a downgrade
---> Package glibc-common.x86_64 0:2.21.90-4.fc23 will be erased
---> Package glibc-devel.x86_64 0:2.21.90-3.fc23.1 will be a downgrade
---> Package glibc-devel.x86_64 0:2.21.90-4.fc23 will be erased
---> Package glibc-headers.x86_64 0:2.21.90-3.fc23.1 will be a downgrade
---> Package glibc-headers.x86_64 0:2.21.90-4.fc23 will be erased
---> Package nscd.x86_64 0:2.21.90-3.fc23.1 will be a downgrade
---> Package nscd.x86_64 0:2.21.90-4.fc23 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================
 Package               Arch           Version                     Repository                                      Size
=======================================================================================================================
Downgrading:
 glibc                 x86_64         2.21.90-3.fc23.1            /glibc-2.21.90-3.fc23.1.x86_64                  14 M
 glibc-common          x86_64         2.21.90-3.fc23.1            /glibc-common-2.21.90-3.fc23.1.x86_64          115 M
 glibc-devel           x86_64         2.21.90-3.fc23.1            /glibc-devel-2.21.90-3.fc23.1.x86_64           1.0 M
 glibc-headers         x86_64         2.21.90-3.fc23.1            /glibc-headers-2.21.90-3.fc23.1.x86_64         2.2 M
 nscd                  x86_64         2.21.90-3.fc23.1            /nscd-2.21.90-3.fc23.1.x86_64                  188 k

Transaction Summary
=======================================================================================================================
Downgrade  5 Packages

Total size: 132 M
Is this ok [y/d/N]: Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2015-03-02.22-53.o2WMUI.yumtx


# rm -f glibc-static-2.21.90-3.fc23.1.x86_64.rpm glibc-utils-2.21.90-3.fc23.1.x86_64.rpm


# dnf downgrade *.rpm --allowerasing
Using metadata from Sun Mar  1 17:45:15 2015
Dependencies resolved.
=======================================================================================================================
 Package                      Arch                  Version                          Repository                   Size
=======================================================================================================================
Downgrading:
 glibc                        x86_64                2.21.90-3.fc23.1                 @commandline                3.6 M
 glibc-common                 x86_64                2.21.90-3.fc23.1                 @commandline                 11 M
 glibc-devel                  x86_64                2.21.90-3.fc23.1                 @commandline                902 k
 glibc-headers                x86_64                2.21.90-3.fc23.1                 @commandline                492 k
 nscd                         x86_64                2.21.90-3.fc23.1                 @commandline                 91 k

Transaction Summary
=======================================================================================================================
Downgrade  5 Packages

Total size: 16 M
Is this ok [y/N]: Operation aborted.


# dnf install *.rpm
Using metadata from Sun Mar  1 17:45:15 2015
Package glibc-2.21.90-4.fc23.x86_64 is already installed, skipping.
Package glibc-common-2.21.90-4.fc23.x86_64 is already installed, skipping.
Package glibc-devel-2.21.90-4.fc23.x86_64 is already installed, skipping.
Package glibc-headers-2.21.90-4.fc23.x86_64 is already installed, skipping.
Package nscd-2.21.90-4.fc23.x86_64 is already installed, skipping.
Error: Nothing to do.

Comment 3 Honza Silhan 2015-03-16 17:40:20 UTC
It works for me without --allowerasing switch. Can you upload the debugdata [1], please? Probably we should just add `SOLVER_FLAG_ALLOW_DOWNGRADE` flag to solver during any downgrades.

[1] https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting#depsolving-problem

Comment 4 Daniel Miranda 2015-04-09 01:22:53 UTC
I observe the exact same problem trying to install a set of old kernel packages.

$ sudo dnf downgrade ./kernel-devel-3.18.7-200.fc21.x86_64.rpm ./kernel-modules-3.18.7-200.fc21.x86_64.rpm ./kernel-core-3.18.7-200.fc21.x86_64.rpm ./kernel-3.18.7-200.fc21.x86_64.rpm ./kernel-modules-extra-3.18.7-200.fc21.x86_64.rpm 
Using metadata from Tue Apr  7 20:49:36 2015
Error: package kernel-modules-extra-3.18.7-200.fc21.x86_64 is not installable

Adding --allowerasing doesn't change anything.

$ sudo dnf install ./kernel-devel-3.18.7-200.fc21.x86_64.rpm ./kernel-modules-3.18.7-200.fc21.x86_64.rpm ./kernel-core-3.18.7-200.fc21.x86_64.rpm ./kernel-3.18.7-200.fc21.x86_64.rpm ./kernel-modules-extra-3.18.7-200.fc21.x86_64.rpm 
Using metadata from Tue Apr  7 20:49:36 2015
Package kernel-devel-3.19.2-201.fc21.x86_64 is already installed, skipping.
Package kernel-modules-3.19.2-201.fc21.x86_64 is already installed, skipping.
Package kernel-core-3.19.2-201.fc21.x86_64 is already installed, skipping.
Package kernel-3.19.2-201.fc21.x86_64 is already installed, skipping.
Package kernel-modules-extra-3.19.2-201.fc21.x86_64 is already installed, skipping.
Error: Nothing to do.

I'll attach the debugdata in the following minutes.

Comment 5 Daniel Miranda 2015-04-09 01:24:38 UTC
Created attachment 1012468 [details]
DNF debugdata for kernel downgrade attempt

Comment 6 Jan Kurik 2015-07-15 14:28:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 7 Fedora Admin XMLRPC Client 2016-07-08 09:36:23 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Ben Boeckel 2016-07-24 04:08:45 UTC
I'm assuming the debugdata from Comment #5 is sufficient?

Comment 9 Fedora End Of Life 2016-11-24 11:30:40 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Jaroslav Mracek 2016-11-29 19:37:19 UTC
It works like expected with upstream version of dnf-2.0.0-0.rc1.1.git.0.1d82616.fc25.noarch

Thank you for report


[jmracek@dhcp-0-213 test-1]$ sudo dnf install TestA*.rpm TestB*.rpm --disablerepo=* 
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                         Repository                                            Size
===================================================================================================================================================================================================================
Installing:
 TestA                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestA-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k

Transaction Summary
===================================================================================================================================================================================================================
Install  4 Packages

Total size: 23 k
Installed size: 0  
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : TestB-1.0.0-1.noarch                                                                                                                                                                           1/4 
  Installing  : TestA-1.0.0-1.noarch                                                                                                                                                                           2/4 
  Installing  : TestB-debuginfo-1.0.0-1.noarch                                                                                                                                                                 3/4 
  Installing  : TestA-debuginfo-1.0.0-1.noarch                                                                                                                                                                 4/4 
  Verifying   : TestA-1.0.0-1.noarch                                                                                                                                                                           1/4 
  Verifying   : TestA-debuginfo-1.0.0-1.noarch                                                                                                                                                                 2/4 
  Verifying   : TestB-1.0.0-1.noarch                                                                                                                                                                           3/4 
  Verifying   : TestB-debuginfo-1.0.0-1.noarch                                                                                                                                                                 4/4 

Installed:
  TestA.noarch 1.0.0-1                           TestA-debuginfo.noarch 1.0.0-1                           TestB.noarch 1.0.0-1                           TestB-debuginfo.noarch 1.0.0-1                          

Complete!
[jmracek@dhcp-0-213 test-1]$ cd ..
[jmracek@dhcp-0-213 repo]$ cd upgrade_1
[jmracek@dhcp-0-213 upgrade_1]$ sudo dnf upgrade TestA*.rpm TestB*.rpm --disablerepo=* 
Error: There are no enabled repos.
[jmracek@dhcp-0-213 upgrade_1]$ sudo dnf upgrade TestA*.rpm TestB*.rpm --disablerepo=* --enablerepo=fedora
Last metadata expiration check: 3 days, 11:18:07 ago on Sat Nov 26 09:14:46 2016 CET.
Package TestA of higher version already installed, cannot update it.
Package TestB of higher version already installed, cannot update it.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                         Repository                                            Size
===================================================================================================================================================================================================================
Upgrading:
 TestA                                                   noarch                                         1.0.0-2                                         @commandline                                         5.7 k
 TestA-debuginfo                                         noarch                                         1.0.0-2                                         @commandline                                         5.7 k
 TestB                                                   noarch                                         1.0.0-2                                         @commandline                                         5.7 k
 TestB-debuginfo                                         noarch                                         1.0.0-2                                         @commandline                                         5.7 k

Transaction Summary
===================================================================================================================================================================================================================
Upgrade  4 Packages

Total size: 23 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Upgrading   : TestB-1.0.0-2.noarch                                                                                                                                                                           1/8 
  Upgrading   : TestA-1.0.0-2.noarch                                                                                                                                                                           2/8 
  Upgrading   : TestB-debuginfo-1.0.0-2.noarch                                                                                                                                                                 3/8 
  Upgrading   : TestA-debuginfo-1.0.0-2.noarch                                                                                                                                                                 4/8 
  Cleanup     : TestA-1.0.0-1.noarch                                                                                                                                                                           5/8 
  Cleanup     : TestB-1.0.0-1.noarch                                                                                                                                                                           6/8 
  Cleanup     : TestB-debuginfo-1.0.0-1.noarch                                                                                                                                                                 7/8 
  Cleanup     : TestA-debuginfo-1.0.0-1.noarch                                                                                                                                                                 8/8 
  Verifying   : TestA-1.0.0-2.noarch                                                                                                                                                                           1/8 
  Verifying   : TestA-debuginfo-1.0.0-2.noarch                                                                                                                                                                 2/8 
  Verifying   : TestB-1.0.0-2.noarch                                                                                                                                                                           3/8 
  Verifying   : TestB-debuginfo-1.0.0-2.noarch                                                                                                                                                                 4/8 
  Verifying   : TestA-1.0.0-1.noarch                                                                                                                                                                           5/8 
  Verifying   : TestA-debuginfo-1.0.0-1.noarch                                                                                                                                                                 6/8 
  Verifying   : TestB-1.0.0-1.noarch                                                                                                                                                                           7/8 
  Verifying   : TestB-debuginfo-1.0.0-1.noarch                                                                                                                                                                 8/8 

Upgraded:
  TestA.noarch 1.0.0-2                           TestA-debuginfo.noarch 1.0.0-2                           TestB.noarch 1.0.0-2                           TestB-debuginfo.noarch 1.0.0-2                          

Complete!
[jmracek@dhcp-0-213 upgrade_1]$ cd ..
[jmracek@dhcp-0-213 repo]$ cd test-1
[jmracek@dhcp-0-213 test-1]$ sudo dnf downgrade TestA*.rpm TestB*.rpm --disablerepo=* --enablerepo=fedora
Last metadata expiration check: 3 days, 11:18:49 ago on Sat Nov 26 09:14:46 2016 CET.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                         Repository                                            Size
===================================================================================================================================================================================================================
Downgrading:
 TestA                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestA-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k

Transaction Summary
===================================================================================================================================================================================================================
Downgrade  4 Packages

Total size: 23 k
Is this ok [y/N]: 
Operation aborted.
[jmracek@dhcp-0-213 test-1]$ sudo dnf downgrade TestA*.rpm TestB*.rpm 
Last metadata expiration check: 2:09:12 ago on Tue Nov 29 18:24:46 2016 CET.
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                         Repository                                            Size
===================================================================================================================================================================================================================
Downgrading:
 TestA                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestA-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k

Transaction Summary
===================================================================================================================================================================================================================
Downgrade  4 Packages

Total size: 23 k
Is this ok [y/N]: 
Operation aborted.
[jmracek@dhcp-0-213 test-1]$ sudo dnf downgrade TestA*.rpm TestB*.rpm --disablerepo=* 
Dependencies resolved.
===================================================================================================================================================================================================================
 Package                                                 Arch                                           Version                                         Repository                                            Size
===================================================================================================================================================================================================================
Downgrading:
 TestA                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestA-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB                                                   noarch                                         1.0.0-1                                         @commandline                                         5.7 k
 TestB-debuginfo                                         noarch                                         1.0.0-1                                         @commandline                                         5.7 k

Transaction Summary
===================================================================================================================================================================================================================
Downgrade  4 Packages

Total size: 23 k
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Downgrading : TestB-1.0.0-1.noarch                                                                                                                                                                           1/8 
  Downgrading : TestA-1.0.0-1.noarch                                                                                                                                                                           2/8 
  Downgrading : TestB-debuginfo-1.0.0-1.noarch                                                                                                                                                                 3/8 
  Downgrading : TestA-debuginfo-1.0.0-1.noarch                                                                                                                                                                 4/8 
  Erasing     : TestA-1.0.0-2.noarch                                                                                                                                                                           5/8 
  Erasing     : TestB-1.0.0-2.noarch                                                                                                                                                                           6/8 
  Erasing     : TestB-debuginfo-1.0.0-2.noarch                                                                                                                                                                 7/8 
  Erasing     : TestA-debuginfo-1.0.0-2.noarch                                                                                                                                                                 8/8 
  Verifying   : TestA-1.0.0-1.noarch                                                                                                                                                                           1/8 
  Verifying   : TestA-debuginfo-1.0.0-1.noarch                                                                                                                                                                 2/8 
  Verifying   : TestB-1.0.0-1.noarch                                                                                                                                                                           3/8 
  Verifying   : TestB-debuginfo-1.0.0-1.noarch                                                                                                                                                                 4/8 
  Verifying   : TestA-1.0.0-2.noarch                                                                                                                                                                           5/8 
  Verifying   : TestA-debuginfo-1.0.0-2.noarch                                                                                                                                                                 6/8 
  Verifying   : TestB-1.0.0-2.noarch                                                                                                                                                                           7/8 
  Verifying   : TestB-debuginfo-1.0.0-2.noarch                                                                                                                                                                 8/8 

Downgraded:
  TestA.noarch 1.0.0-1                           TestA-debuginfo.noarch 1.0.0-1                           TestB.noarch 1.0.0-1                           TestB-debuginfo.noarch 1.0.0-1                          

Complete!


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