Bug 1224049 - problems to run dnf-2 migrate after upgrade
Summary: problems to run dnf-2 migrate after upgrade
Keywords:
Status: CLOSED DUPLICATE of bug 1223034
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-extras
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-22 06:08 UTC by Heldwin
Modified: 2015-07-22 13:19 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-07-22 13:19:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Heldwin 2015-05-22 06:08:51 UTC
Description of problem:
After I upgraded my system to f22, I got a warning telling me I would need to migrate to dnf.

So I ran: dnf-2 migrate
history migrated correctly, but had to run it 3 times to be able to migrate YUMDB.

After that, the migration of groups data is stopped with a message: malformed yum output

Version-Release number of selected component (if applicable):
dnf-1.0.0-1.fc22.noarch

# echo $LANG
fr_CH.UTF-8

This is the 2nd try, the first only found 373 YUMDB records.

2108 YUMDB records found, 1734 migrated, 374 skipped/preserved
Traceback (most recent call last):
  File "/bin/dnf-2", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 185, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1077, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/migrate.py", line 123, in run
    self.migrate_yumdb()
  File "/usr/lib/python2.7/site-packages/dnf-plugins/migrate.py", line 289, in migrate_yumdb
    setattr(dnfdata, attribute, value)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 295, in __setattr__
    self._write(attr, value)
  File "/usr/lib/python2.7/site-packages/dnf/yum/rpmsack.py", line 232, in _write
    dnf.pycomp.write_to_file(fo, value)
  File "/usr/lib/python2.7/site-packages/dnf/pycomp.py", line 88, in write_to_file
    f.write(content.encode('utf-8'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal not in range(128)

This is after the 3rd try, when it was able to migrate all YUMDB records:

Migrating groups data...
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Erreur : Malformed yum output

Comment 1 Heldwin 2015-05-22 06:12:42 UTC
yum-3.4.3-505.fc22.noarch

Comment 2 Radek Holy 2015-05-22 06:48:12 UTC
Hello, the first error is a duplicate of bug 1223034.
The second one is potentially a duplicate of bug 1214807. Could you please check whether you system is/was in the same state as reported in that bug?

Comment 3 Heldwin 2015-05-24 19:32:49 UTC
I don't remember having installed a group with yum, and 'yum group list installed' returns:
Warning: No groups match: installed

in yum.conf, I have:
group_command=compat

Comment 4 Antonio T. (sagitter) 2015-05-27 20:56:38 UTC
Similar problem for me with dnf-plugins-extras-0.0.8-1.fc22:

2846 YUMDB records found, 0 migrated, 2846 skipped/preserved
Migrating groups data...
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Traceback (most recent call last):
  File "/usr/bin/dnf-2", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 185, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1077, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/migrate.py", line 126, in run
    self.migrate_groups()
  File "/usr/lib/python2.7/site-packages/dnf-plugins/migrate.py", line 250, in migrate_groups
    group_cmd._mark_install(installed)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands/group.py", line 240, in _mark_install
    dnf.comps.install_or_skip(solver.group_install, res.groups, types)
  File "/usr/lib/python2.7/site-packages/dnf/comps.py", line 86, in install_or_skip
    count += install_fnc(grp, types, None)
TypeError: unsupported operand type(s) for +=: 'int' and 'TransactionBunch'

Comment 5 Sean Richards 2015-05-27 21:42:45 UTC
Yea, I am also getting the same error message.  I did an upgrade from Fedora 21 to Fedora 22.  Everything appears to have gone well.  However, I do go the warning about yum so I ran dnf-2 migrate and I got the following warning.

cout += install_fnc(grp, types, None)
TypeError: unsupported operand type(s) for +=: 'int' and 'TransactionBunch'.

Comment 6 Honza Silhan 2015-07-22 13:19:20 UTC
The rest of bug reports are fixed too.

*** This bug has been marked as a duplicate of bug 1223034 ***


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