Bug 1283255 - downgrade doesn't resolve dependencies automatically
downgrade doesn't resolve dependencies automatically
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: libdnf (Show other bugs)
rawhide
Unspecified Unspecified
low Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: EasyFix, FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-18 09:25 EST by Kamil Páral
Modified: 2017-02-13 05:22 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-10 10:03:02 EST
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 Kamil Páral 2015-11-18 09:25:37 EST
Description of problem:
If I want to downgrade a package, I have to manually list all of its dependencies and downgrade them as well. That's tiresome and difficult to do. Could you please make downgrade operation automatically downgrade necessary dependencies as well?

Very simple example:

$ sudo dnf downgrade nautilus
Last metadata expiration check performed 2:16:29 ago on Wed Nov 18 13:02:40 2015.
Error: package nautilus-3.18.1-1.fc23.x86_64 requires nautilus-extensions(x86-64) = 3.18.1-1.fc23, but none of the providers can be installed
(try to add '--allowerasing' to command line to replace conflicting packages)

$ sudo dnf downgrade nautilus*
Last metadata expiration check performed 2:16:31 ago on Wed Nov 18 13:02:40 2015.
Dependencies resolved.
============================================================================================================================================
 Package                                  Arch                        Version                             Repository                   Size
============================================================================================================================================
Downgrading:
 nautilus                                 x86_64                      3.18.1-1.fc23                       fedora                      2.4 M
 nautilus-extensions                      x86_64                      3.18.1-1.fc23                       fedora                       81 k

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


dnf-1.1.3-1.fc23.noarch
Comment 1 Michael Mráka 2015-11-19 04:51:01 EST
Well, what does exactly mean necessary dependencies?
All dependencies down to e.g. glibc?
Or dependencies which somehow conflict with downgraded nautilus version? (This is what's going on now.)

Maybe you just wanted to remove latest nautilus update in which case 
# dnf history list nautilus
# dnf history undo <id-of-last-update-transaction>
would do the job for you.
Comment 2 Kamil Páral 2015-11-19 05:34:53 EST
(In reply to Michael Mráka from comment #1)
> Or dependencies which somehow conflict with downgraded nautilus version?
> (This is what's going on now.)

Yes, that's what I meant. In this case it's really simple, 'nautilus*' solves it, but in some cases, you need include many differently named packages in the set, and you need to go one by one, manually adding one additional package to the downgrade line, try again, read the error, add another package, try again, read the error, ... until you have listed everything needed on the command line.

I assume dnf should be able to figure this out automatically, i.e. find out the smallest set of packages available in the repos that need to be installed on the system in order to have the package in question downgraded while all dependencies are satisfied. In most cases this means downgrading a set of packages (in some cases it can also mean installing or removing some).

> 
> Maybe you just wanted to remove latest nautilus update in which case 
> # dnf history list nautilus
> # dnf history undo <id-of-last-update-transaction>
> would do the job for you.

No, I really wanted to downgrade a package :) I'm from Fedora QA, I spend a large portion of my time using unreleased builds/updates, or comparing those unreleased builds with older builds (either from repos or from koji), and downgrading is a very common operation for me. It would be great if it could resolve the deps automatically and I didn't have to spend that much time doing it manually.

Btw, "history undo" is handy but very limited, e.g. it doesn't work if one update replaces an older update in "updates" repo (because then there's nothing to go back to, you need to downgrade to the version in "fedora" repo, for which you need the "downgrade" command). But that's just a side remark.
Comment 3 Honza Silhan 2015-11-23 07:35:00 EST
Probably we should add `SOLVER_FLAG_ALLOW_DOWNGRADE` flag into the depsolver not blindly set downgrade for all dependencies beforehand.
Comment 4 Fedora Admin XMLRPC Client 2016-07-08 05:24:52 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora End Of Life 2016-11-24 08:33:03 EST
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 6 Jaroslav Mracek 2016-11-29 15:30:07 EST
It should be fixed by Pull-request: https://github.com/rpm-software-management/dnf/pull/666
Comment 7 Jaroslav Mracek 2017-02-10 10:57:14 EST
Bugs fixed in version of dnf-2.0.1-1.
Comment 8 Kamil Páral 2017-02-13 05:22:55 EST
Thanks!

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