Bug 1148630 - add --allowerasing hint for conflict problems
add --allowerasing hint for conflict problems
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Honza Silhan
Fedora Extras Quality Assurance
:
: 1160659 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-01 18:59 EDT by Rahul Sundaram
Modified: 2015-08-10 22:08 EDT (History)
9 users (show)

See Also:
Fixed In Version: dnf-1.0.2-3.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-10 22:08:14 EDT
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)
changes to make dnf default (2.61 KB, patch)
2014-10-06 06:40 EDT, Rahul Sundaram
no flags Details | Diff
revised changes to make dnf default (2.51 KB, patch)
2014-10-06 06:51 EDT, Rahul Sundaram
no flags Details | Diff
revised and sorted changes to make dnf default (2.51 KB, patch)
2014-10-06 07:04 EDT, Rahul Sundaram
no flags Details | Diff

  None (edit)
Description Rahul Sundaram 2014-10-01 18:59:32 EDT
Description of problem:

neither --allowerasing and --refresh is documented in the man page.  --allowerasing should be automatically suggested by dnf for applicable conflicts where it would work.  Suggested hint is as below.

sudo dnf install dnf-yum 
[sudo] password for rahul: 
Error: package dnf-yum-0.6.1-1.fc21.noarch conflicts with yum provided by yum-3.4.3-153.fc21.noarch

Hint: Use dnf installl dnf-yum --allowerasing to replace conflicting package(s).
Comment 1 Tim Lauridsen 2014-10-02 01:27:35 EDT
--allowerasing and --refresh is documented in the man page in dnf 0.6.x (F21)

hinting --allowerasing can be nice, but also dangerous, sometime people will just use the hinted option without understanding what it does. And in this case it will remove yum and everything there is requiring yum and bad thing in F20
Comment 2 Tim Lauridsen 2014-10-02 01:28:37 EDT
see the lastes version of man pages here:
http://dnf.readthedocs.org/en/latest/command_ref.html
Comment 3 Rahul Sundaram 2014-10-02 02:10:08 EDT
Good that it got documented now.  

Well, it won't be very dangerous if protected packages were still supported but that is an argument that doesn't seem to have convinced dnf developers yet.
Comment 4 Tim Lauridsen 2014-10-02 03:25:44 EDT
if dnf-plugins-core is installed, then the protected_packages plugin will protect the packages definded in /etc/yum/protected.d & /etc/dnf/protected.d

So protected packages are supported if the distro want it to be :)
Comment 5 Radek Holy 2014-10-02 03:26:40 EDT
Rahul, --allowerasing is documented all the time the the switch is available. It's almost a year today.
https://github.com/rpm-software-management/dnf/commit/c9150287acdbe10f6033ddea20fcaedfa06624f9

The same applies for the --refresh. It's about 4 months.
https://github.com/rpm-software-management/dnf/commit/8ccf18eceff8327f00854cdb6454db8ee1f605dc
Comment 6 Rahul Sundaram 2014-10-02 03:38:38 EDT
If dnf developers will not object, I will send in a comps patch to get dnf-plugins-core be a default package

@Radek, I am not sure how I missed it.  Do consider adding in a hint to use it in cases where it helps.
Comment 7 Honza Silhan 2014-10-02 08:11:03 EDT
Rahul, having dnf-plugins-core by default would be great.

We could add that hint for conflict errors, many people report bugs that could be solved by this flag.
Comment 8 Rahul Sundaram 2014-10-02 08:48:51 EDT
So I clone the comps git repo and I see that dnf hasn't been added yet as a default package in the f-22 file.   Are you folks still targeting f22 as the release where dnf becomes default?  Are you waiting for anything in particular before making this change?

There are a whole bunch of packages that are still depending on yum including mock, fedora-packager etc
Comment 9 Honza Silhan 2014-10-03 11:25:01 EDT
Yes, DNF should be in F22. Lets wait for confirmation of jzeleny (if there are some news I don't know).
Comment 10 Jan Zeleny 2014-10-06 04:25:45 EDT
Nothing has changed, DNF is still supposed to become default software manager in F22
Comment 11 Rahul Sundaram 2014-10-06 06:40:58 EDT
Created attachment 944212 [details]
changes to make dnf default
Comment 12 Rahul Sundaram 2014-10-06 06:42:11 EDT
Comps patch for the necessary changes.  I am leaving yum in the build group just because mock hasn't been ported over yet.  Rest should be self evident.  Please review before I commit.  Thanks
Comment 13 Rahul Sundaram 2014-10-06 06:51:50 EDT
Created attachment 944213 [details]
revised changes to make dnf default
Comment 14 Rahul Sundaram 2014-10-06 07:04:16 EDT
Created attachment 944216 [details]
revised and sorted changes to make dnf default
Comment 15 Honza Silhan 2014-10-10 08:17:38 EDT
Rahul, looks good, thanks.
Comment 16 Rahul Sundaram 2014-10-10 13:19:15 EDT
Pushed.
Comment 17 Honza Silhan 2014-11-10 08:17:23 EST
*** Bug 1160659 has been marked as a duplicate of this bug. ***
Comment 18 Jaroslav Reznik 2015-03-03 12:04:13 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22
Comment 19 Kamil Páral 2015-06-22 08:50:09 EDT
The same hint should be provided for downgrading. Example:

$ sudo dnf downgrade abrt
Last metadata expiration check performed 1:31:33 ago on Mon Jun 22 12:58:02 2015.
Error: package abrt-retrace-client-2.6.0-1.fc22.x86_64 requires abrt = 2.6.0-1.fc22, but none of the providers can be installed


The obvious thing to do is:

$ sudo dnf downgrade abrt*
Last metadata expiration check performed 1:31:36 ago on Mon Jun 22 12:58:02 2015.
No match for available package: abrt-addon-python-2.5.1-2.fc22.x86_64
No match for available package: abrt-python3-2.5.1-2.fc22.x86_64
No match for available package: abrt-gui-libs-2.5.1-2.fc22.i686
No match for available package: abrt-gui-libs-2.5.1-2.fc22.x86_64
No match for available package: abrt-tui-2.5.1-2.fc22.x86_64
No match for available package: abrt-gui-2.5.1-2.fc22.x86_64
... snip 100 lines ...
No match for available package: abrt-libs-2.6.0-1.fc22.x86_64
No match for available package: abrt-atomic-2.6.0-1.fc22.x86_64
No match for available package: abrt-retrace-client-2.6.0-1.fc22.x86_64
Error: Nothing to do.


And I was utterly confused how to downgrade abrt. The solution was:

$ sudo dnf downgrade abrt --allowerasing 
Last metadata expiration check performed 1:51:32 ago on Mon Jun 22 12:58:02 2015.
Dependencies resolved.
==========================================================================
 Package                     Arch    Version       Repository        Size
==========================================================================
Removing:
 abrt-desktop                x86_64  2.6.0-1.fc22  @System            0  
 abrt-gui                    x86_64  2.6.0-1.fc22  @System          222 k
Downgrading:
 abrt                        x86_64  2.5.1-2.fc22  updates-testing  516 k
 abrt-addon-ccpp             x86_64  2.5.1-2.fc22  updates-testing  184 k
 abrt-addon-coredump-helper  x86_64  2.5.1-2.fc22  updates-testing  102 k
 abrt-addon-kerneloops       x86_64  2.5.1-2.fc22  updates-testing  120 k
 abrt-addon-pstoreoops       x86_64  2.5.1-2.fc22  updates-testing   98 k
 abrt-addon-python           x86_64  2.5.1-2.fc22  updates-testing   99 k
 abrt-addon-python3          x86_64  2.5.1-2.fc22  updates-testing   98 k
 abrt-addon-vmcore           x86_64  2.5.1-2.fc22  updates-testing  108 k
 abrt-addon-xorg             x86_64  2.5.1-2.fc22  updates-testing   99 k
 abrt-cli                    x86_64  2.5.1-2.fc22  updates-testing   90 k
 abrt-dbus                   x86_64  2.5.1-2.fc22  updates-testing  123 k
 abrt-libs                   x86_64  2.5.1-2.fc22  updates-testing  114 k
 abrt-plugin-bodhi           x86_64  2.5.1-2.fc22  updates-testing   98 k
 abrt-python                 x86_64  2.5.1-2.fc22  updates-testing  111 k
 abrt-python3                x86_64  2.5.1-2.fc22  updates-testing  112 k
 abrt-retrace-client         x86_64  2.5.1-2.fc22  updates-testing  125 k
 abrt-tui                    x86_64  2.5.1-2.fc22  updates-testing  100 k

Transaction Summary
==========================================================================
Remove      2 Packages
Downgrade  17 Packages


It needed to remove some packages which were not available with the older version (for some reason). A hint after one of the first two stated commands would help a lot.
Comment 20 Honza Silhan 2015-07-10 12:15:30 EDT
PR: https://github.com/rpm-software-management/dnf/pull/304
Comment 21 Fedora Update System 2015-07-22 04:25:09 EDT
dnf-1.0.2-2.fc22,hawkey-0.5.9-2.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-1.0.2-2.fc22,hawkey-0.5.9-2.fc22
Comment 22 Bruno Wolff III 2015-07-22 12:25:09 EDT
Note that I see this hint even when I have used the --allowerasing option. This hint probably shouldn't be displayed under those circumstances.
Comment 23 Kamil Páral 2015-07-23 04:25:32 EDT
I see the hint when trying to downgrade. Great work, thanks.
Comment 24 Fedora Update System 2015-07-31 22:28:18 EDT
Package dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-1.0.2-3.fc22 hawkey-0.5.9-3.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12577/dnf-1.0.2-3.fc22,hawkey-0.5.9-3.fc22
then log in and leave karma (feedback).
Comment 25 Fedora Update System 2015-08-10 22:08:14 EDT
dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22 has been pushed to the Fedora 22 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.