Bug 981310 - NameError: global name 'to_utf8' is not defined
NameError: global name 'to_utf8' is not defined
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-04 08:51 EDT by Chris Murphy
Modified: 2014-09-30 19:41 EDT (History)
3 users (show)

See Also:
Fixed In Version: dnf-0.3.9-1.giteff4c49.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-18 02:08:18 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)

  None (edit)
Description Chris Murphy 2013-07-04 08:51:01 EDT
Description of problem:
Fails to remove kernel-devel-3.9.6-301.fc19.x86_64 with NameError: global name 'to_utf8' is not defined.

Version-Release number of selected component (if applicable):
dnf-0.3.8-2.git85524ae.fc19.noarch

How reproducible:
Always with

Steps to Reproduce:
1. dnf erase kernel-3.9.6-301.fc19.x86_64 kernel-devel-3.9.6-301.fc19.x86_64 kernel-modules-extra-3.9.6-301.fc19.x86_64


Actual results:

Setting up Remove Process
Resolving Dependencies
--> Starting dependency resolution
--> Finding unneeded leftover dependencies
---> Package kernel.x86_64 3.9.6-301.fc19 will be erased
---> Package kernel-devel.x86_64 3.9.6-301.fc19 will be erased
---> Package kernel-modules-extra.x86_64 3.9.6-301.fc19 will be erased
--> Finished dependency resolution

Dependencies Resolved

======================================================================================================================================================
 Package                                     Arch                          Version                               Repository                      Size
======================================================================================================================================================
Removing:
 kernel                                      x86_64                        3.9.6-301.fc19                        @System                        124 M
 kernel-devel                                x86_64                        3.9.6-301.fc19                        @System                         30 M
 kernel-modules-extra                        x86_64                        3.9.6-301.fc19                        @System                        8.3 M

Transaction Summary
======================================================================================================================================================
Remove  3 Packages

Installed size: 163 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
ERROR with transaction check vs depsolve:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 277, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 42, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 188, in _main
    return_code = base.doTransaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 204, in doTransaction
    resultobject = super(YumBaseCli, self).do_transaction(display)
  File "/usr/lib/python2.7/site-packages/dnf/yum/base.py", line 658, in do_transaction
    print(to_utf8(msg))
NameError: global name 'to_utf8' is not defined

Expected results:
To erase the three selected items.

Additional info:
Breaking this up into separate tasks:

dnf erase kernel-3.9.6-301.fc19.x86_64
(removes kernel and kernel-modules-extra) This succeeds, however removing -devel fails.


[root@f19s ~]# dnf erase kernel-devel-3.9.6-301.fc19.x86_64
Setting up Remove Process
Resolving Dependencies
--> Starting dependency resolution
--> Finding unneeded leftover dependencies
---> Package kernel-devel.x86_64 3.9.6-301.fc19 will be erased
--> Finished dependency resolution

Dependencies Resolved

======================================================================================================================================================
 Package                               Arch                            Version                                 Repository                        Size
======================================================================================================================================================
Removing:
 kernel-devel                          x86_64                          3.9.6-301.fc19                          @System                           30 M

Transaction Summary
======================================================================================================================================================
Remove  1 Package

Installed size: 30 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
ERROR with transaction check vs depsolve:
Traceback (most recent call last):
  File "/usr/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 277, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 42, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 188, in _main
    return_code = base.doTransaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 204, in doTransaction
    resultobject = super(YumBaseCli, self).do_transaction(display)
  File "/usr/lib/python2.7/site-packages/dnf/yum/base.py", line 658, in do_transaction
    print(to_utf8(msg))
NameError: global name 'to_utf8' is not defined



Regression:

yum erase succeeds.


[root@f19s ~]# yum erase kernel-devel-3.9.6-301.fc19.x86_64
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package kernel-devel.x86_64 0:3.9.6-301.fc19 will be erased
--> Processing Dependency: kernel-devel for package: systemtap-devel-2.2.1-1.fc19.x86_64
--> Processing Dependency: kernel-devel for package: systemtap-devel-2.2.1-1.fc19.x86_64
--> Running transaction check
---> Package systemtap-devel.x86_64 0:2.2.1-1.fc19 will be erased
--> Processing Dependency: systemtap-devel = 2.2.1-1.fc19 for package: systemtap-2.2.1-1.fc19.x86_64
--> Running transaction check
---> Package systemtap.x86_64 0:2.2.1-1.fc19 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
 Package                                Arch                          Version                                  Repository                        Size
======================================================================================================================================================
Removing:
 kernel-devel                           x86_64                        3.9.6-301.fc19                           @updates                          30 M
Removing for dependencies:
 systemtap                              x86_64                        2.2.1-1.fc19                             @anaconda                         46 k
 systemtap-devel                        x86_64                        2.2.1-1.fc19                             @anaconda                        5.1 M

Transaction Summary
======================================================================================================================================================
Remove  1 Package (+2 Dependent packages)

Installed size: 36 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Erasing    : systemtap-2.2.1-1.fc19.x86_64                                                                                                      1/3 
  Erasing    : systemtap-devel-2.2.1-1.fc19.x86_64                                                                                                2/3 
  Erasing    : kernel-devel-3.9.6-301.fc19.x86_64                                                                                                 3/3 
  Verifying  : kernel-devel-3.9.6-301.fc19.x86_64                                                                                                 1/3 
  Verifying  : systemtap-2.2.1-1.fc19.x86_64                                                                                                      2/3 
  Verifying  : systemtap-devel-2.2.1-1.fc19.x86_64                                                                                                3/3 

Removed:
  kernel-devel.x86_64 0:3.9.6-301.fc19                                                                                                                

Dependency Removed:
  systemtap.x86_64 0:2.2.1-1.fc19                                        systemtap-devel.x86_64 0:2.2.1-1.fc19                                       

Complete!
Comment 1 Chris Murphy 2013-07-04 08:53:22 EDT
Worked fine with kernel-devel-3.9.8-300.fc19.x86_64.
Comment 2 Ales Kozumplik 2013-07-04 09:21:00 EDT
Thanks for the report.

The RPM transaction check reporting was broken by 4dad74e. Looking into fixing it.
Comment 3 Ales Kozumplik 2013-07-04 09:41:52 EDT
The traceback is addressed by commit 0e1663a, the patch will be included in dnf-0.3.9.
Comment 4 Fedora Update System 2013-07-08 04:14:39 EDT
dnf-0.3.9-1.giteff4c49.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/dnf-0.3.9-1.giteff4c49.fc19
Comment 5 Fedora Update System 2013-07-08 21:28:05 EDT
Package dnf-0.3.9-1.giteff4c49.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.3.9-1.giteff4c49.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-12578/dnf-0.3.9-1.giteff4c49.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-07-18 02:08:18 EDT
dnf-0.3.9-1.giteff4c49.fc19 has been pushed to the Fedora 19 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.