Bug 1214200

Summary: [dnf-yum] improve the "dnf migrate" suggestion
Product: [Fedora] Fedora Reporter: James Patterson <jamespatterson>
Component: dnfAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, Marcin.Dulak, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-23 14:20:05 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:
Attachments:
Description Flags
Vagrantfile demonstrating "Failed loading plugin: migrate" none

Description James Patterson 2015-04-22 08:44:30 UTC
Description of problem:

I am told to run dnf migrate, but it doesn't exist:

# yum upgrade -y
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run 'dnf migrate'Redirecting to '/usr/bin/dnf upgrade -y'

# dnf migrate
No such command: migrate. Please use /bin/dnf-2 --help
It could be a DNF plugin command.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Parag Nemade 2015-04-22 09:14:53 UTC
You need dnf-plugins-extras-migrate package

Comment 2 James Patterson 2015-04-22 09:30:04 UTC
Could that be installed by default, or could you mention the package name in the error, or could you hide that error if the binary is not on the system?

Comment 3 Radek Holy 2015-04-22 09:51:48 UTC
There is already a patch (requested in bug 1208773) that changes the message:
    No such command: migrate. Please use /bin/dnf-2 --help
    It could be a DNF plugin command.
to:
    No such command: migrate. Please use /bin/dnf-2 --help
    try: "dnf install 'dnf-command(%s)'"
which may help a bit.


Also the upstream DNF version now prints:
   To transfer transaction metadata from yum to DNF, run:
   'dnf install python-dnf-plugins-extras-migrate && dnf-2 migrate'
instead of:
   To transfer transaction metadata from yum to DNF, run 'dnf migrate'

Comment 4 marcindulak 2016-02-05 11:22:19 UTC
Created attachment 1121351 [details]
Vagrantfile demonstrating "Failed loading plugin: migrate"

Comment 5 marcindulak 2016-02-05 11:23:11 UTC
I'm still getting related problems using Fedora 23: https://atlas.hashicorp.com/fedora/boxes/23-cloud-base/versions/20151030

To reproduce with the attached Vagrantfile do:
0. vagrant up
2. vagrant ssh -c 'sudo su - -c "dnf -y install python-dnf-plugins-extras-migrate && dnf-2 migrate"'
...
Failed loading plugin: migrate
No such command: migrate. Please use /usr/bin/dnf-2 --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(migrate)'"
...

However, when I inject an additional step 1.
1. vagrant ssh -c 'sudo su - -c "dnf clean all&& yum -y update"'
I don't get the errors.

The following step,  suggested by the failing step 2., fails anyway:
3. vagrant ssh -c "sudo su - -c \"dnf install 'dnf-command(migrate)'\""
...
No package dnf-command(migrate) available.
Error: Unable to find a match.