Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1152732 - dnf crashes when using accentued chars in path and LANG=C
Summary: dnf crashes when using accentued chars in path and LANG=C
Keywords:
Status: CLOSED DUPLICATE of bug 1155877
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Honza Silhan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-14 19:45 UTC by Heldwin
Modified: 2014-12-09 16:06 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-09 16:06:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Heldwin 2014-10-14 19:45:50 UTC
Description of problem:
When downloading a package from koji (for example), if using a full path with accentued chars, dnf crashes.

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

How reproducible:
Always

Steps to Reproduce:
1.LANG=C dnf update /home/xxx/Téléchargements/a_package.rpm


Actual results:

# LANG=C dnf update /home/xxx/Téléchargements/*.rpm
Traceback (most recent call last):
  File "/bin/dnf", 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 182, 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 115, in _main
    cli.configure(map(ucd, args))
  File "/usr/lib/python2.7/site-packages/dnf/i18n.py", line 130, in ucd
    return unicode(str(obj), _guess_encoding())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)

Comment 1 Honza Silhan 2014-10-20 15:01:24 UTC
Hi, thanks for the report. It could give better message and correctly ends with error code instead of traceback.

Heldwin, did you do that accidentally or you wanted to achieve something by setting locale to ASCII chars only and put inside non-ASCII chars?

Comment 2 Heldwin 2014-10-20 22:39:04 UTC
My system is in french (fr_CH), and used that command to get an english output of dnf.

So, it is mid-way accidentally and not accidentally.

Accidentally, for having an accentued character in the path, and not accidentally, because it is easier to get help when we switch output to english with LANG=C.

If I put the local rpm in a path that doesn't have an accentued char, it doesn't give that traceback and the command end correctly.

Comment 3 Honza Silhan 2014-12-09 16:06:10 UTC

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


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