Bug 1340657 - Dnf cannot cope with utf-8
Summary: Dnf cannot cope with utf-8
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 23
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-29 18:39 UTC by luka sini
Modified: 2016-06-01 12:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-05-30 11:48:58 UTC
Type: Bug

Attachments (Terms of Use)

Description luka sini 2016-05-29 18:39:15 UTC
Description of problem:
I cannot run anymore dnf update, nor install any packages.

Version-Release number of selected component (if applicable):
[root@fedora-23]# dnf --version
  Installed: dnf-0:1.1.9-1.fc23.noarch at 2016-05-26 07:23
  Built    : Fedora Project at 2016-05-19 09:29

  Installed: rpm-0:4.13.0-0.rc1.13.fc23.x86_64 at 2016-05-01 15:37
  Built    : Fedora Project at 2016-04-25 13:50

How reproducible:
no idea. I have tried to remove and place repository one by one.

Steps to Reproduce:
1. dnf update or dnf install

Actual results:
A python exception gets thrown.

Expected results:
I would expect to complete the update.

Additional info:
That's the error message I receive after "dependencied resolved"

Dependencies resolved.
Traceback (most recent call last):
  File "/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 120, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 142, in resolving
  File "/usr/lib/python3.4/site-packages/dnf/plugin.py", line 82, in fn
    dnf.util.mapall(operator.methodcaller(method), self.plugins)
  File "/usr/lib/python3.4/site-packages/dnf/util.py", line 183, in mapall
    return list(map(fn, *seq))
  File "/usr/lib/python3.4/site-packages/dnf-plugins/protected_packages.py", line 66, in resolved
    protected = set(get_protected_names())
  File "/usr/lib/python3.4/site-packages/dnf-plugins/protected_packages.py", line 38, in get_protected_names
    protected.extend(map(str.strip, conf_file.readlines()))
  File "/usr/lib64/python3.4/codecs.py", line 319, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte

Comment 1 Honza Silhan 2016-05-30 11:48:58 UTC
this will be removed in dnf-2 and it would be config option. This should be fixed.


Comment 2 luka sini 2016-06-01 12:15:52 UTC
Hi Jan!
Thanks for your answer. 

Is there any way I can fix this problem on my release?

I tried to apply the patch manually, but it seems that many other code is still missing.

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