Hide Forgot
Created attachment 1127634 [details] Full terminal output and traceback Description of problem: I have my locales set to cs_CZ.utf8. When I download some files, they end up in ~/Stažené which means ~/Downloads When I install downloaded packages, I do something like: # dnf install ./Stažené/nosync-1.0-3.fc23.i686.rpm The installation works fine, but after the installation, a traceback is shown. Version-Release number of selected component (if applicable): dnf-1.1.6-2.fc23.noarch How reproducible: Only when some dependent packages are installed as well. Steps to Reproduce: 1. Download an rpm, I've used i686 of nosync http://koji.fedoraproject.org/koji/buildinfo?buildID=724570 2. Place that RPM to ~/Stažené 3. Make sure dependencies are not already satisfied (e.g. for nosync make sure glibc.i686 is missing) 4. dnf install ./Stažené/nosync-1.0-3.fc23.i686.rpm Actual results: Package installs fine, brings some deps. Traceback is shown after "You can remove cached packages by executing 'dnf clean packages'." message is shown. Expected results: Package installs fine, brings some deps. No tracebacks. Additional info: Full terminal output and traceback attached. You are writing Unicode data (the command I put on command line) to this object: <_io.TextIOWrapper name='/var/lib/dnf/yumdb/n/[longhash]-nosync-1.0-3.fc23-i686/command_line.tmp' mode='w' encoding='ANSI_X3.4-1968'> And it blows up. I was unable to reproduce this from Python 3 shell, because if I do (as you do): fo = dnf.yum.rpmsack._open_no_umask(fn + '.tmp', 'w') fo is <_io.TextIOWrapper name='...tmp' mode='w' encoding='UTF-8'> At this point, my investigation ends. No idea, why your _io.TextIOWrappers are ANSI_X3.4-1968.
thanks for the report. We'll fix this.
*** Bug 1312021 has been marked as a duplicate of this bug. ***
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
The patch is here and is waiting for review: https://github.com/rpm-software-management/dnf/pull/550
Merged as part of DNF 2.0 release.
# ./bin/dnf-2 install ekiga Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ekiga x86_64 4.0.1-23.fc23 fedora 8.1 M Installing dependencies: ... Is this ok [y/N]: y Downloading Packages: ... Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Traceback (most recent call last): File "./bin/dnf-2", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/root/dnf.git/dnf/cli/main.py", line 170, in user_main errcode = main(args) File "/root/dnf.git/dnf/cli/main.py", line 60, in main return _main(base, args) File "/root/dnf.git/dnf/cli/main.py", line 119, in _main ret = resolving(cli, base) File "/root/dnf.git/dnf/cli/main.py", line 146, in resolving base.do_transaction(display=displays) File "/root/dnf.git/dnf/cli/cli.py", line 221, in do_transaction super(BaseCli, self).do_transaction(display) File "/root/dnf.git/dnf/base.py", line 639, in do_transaction self._run_transaction(cb=cb) File "/root/dnf.git/dnf/base.py", line 685, in _run_transaction rpmdbv = self.sack._rpmdb_version(self._yumdb) File "/root/dnf.git/dnf/sack.py", line 90, in _rpmdb_version if 'checksum_type' in ydbi and 'checksum_data' in ydbi: File "/root/dnf.git/dnf/yum/rpmsack.py", line 311, in __contains__ x = self.get(attr) File "/root/dnf.git/dnf/yum/rpmsack.py", line 338, in get res = self._read(attr) File "/root/dnf.git/dnf/yum/rpmsack.py", line 265, in _read fo, e = _iopen(fn) File "/root/dnf.git/dnf/yum/rpmsack.py", line 59, in _iopen ret = open(*args, encoding='utf-8') TypeError: 'encoding' is an invalid keyword argument for this function # git log dnf/yum/rpmsack.py commit 63ab30c520d9fb7d83496f3616e454c363d4bacc Author: Jaroslav Mracek <jmracek> Date: Thu Jul 28 09:54:42 2016 +0200 Fix handling with unicode directory (RhBug:1308994) It fixes handling of local rpm from unicode directory. https://bugzilla.redhat.com/show_bug.cgi?id=1308994 Closes: #550 Approved by: ignatenkobrain
Uh oh, py2.
I will make fix for fix. Sorry forget py2.
I create new pull-request that hopefully fix the problem: https://github.com/rpm-software-management/dnf/pull/555
Also, this was reported against Fedora 23. Could you please backport the fix?
dnf-1.1.10-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-267f843cda
dnf-1.1.10-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caa619a9e
dnf-1.1.10-1.fc24 dnf-plugins-core-0.1.21-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-878284e0d3
dnf-1.1.10-1.fc25, dnf-plugins-core-0.1.21-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8caa619a9e
dnf-1.1.10-1.fc23, dnf-plugins-core-0.1.21-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-267f843cda
dnf-1.1.10-1.fc24, dnf-plugins-core-0.1.21-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-878284e0d3
dnf-1.1.10-1.fc24, dnf-plugins-core-0.1.21-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
dnf-1.1.10-1.fc23, dnf-plugins-core-0.1.21-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
dnf-1.1.10-1.fc25, dnf-plugins-core-0.1.21-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.