Bug 1193713 - yum-cron traceback because locale setting
Summary: yum-cron traceback because locale setting
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-cron
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-17 23:43 UTC by Milan Kerslager
Modified: 2016-03-16 22:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 09:12:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to fix the issue in /usr/sbin/yum-cron (476 bytes, patch)
2015-02-17 23:43 UTC, Milan Kerslager
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
CentOS 7675 0 None None None Never

Description Milan Kerslager 2015-02-17 23:43:12 UTC
Created attachment 992941 [details]
Patch to fix the issue in /usr/sbin/yum-cron

I installed the system with my language locale settings (LANG=cs_CZ.utf8).

Sometimes, yum-cron-hourly emits this traceback to my email box:

Traceback (most recent call last):
  File "/usr/sbin/yum-cron", line 711, in <module>
    main()
  File "/usr/sbin/yum-cron", line 708, in main
    base.updatesCheck()
  File "/usr/sbin/yum-cron", line 631, in updatesCheck
    self.installUpdates(self.opts.update_messages)
  File "/usr/sbin/yum-cron", line 582, in installUpdates
    self.emitMessages()
  File "/usr/sbin/yum-cron", line 694, in emitMessages
    map(lambda x: x.sendMessages(), self.emitters)
  File "/usr/sbin/yum-cron", line 694, in <lambda>
    map(lambda x: x.sendMessages(), self.emitters)
  File "/usr/sbin/yum-cron", line 227, in sendMessages
    msg = MIMEText(''.join(self.output))
  File "/usr/lib64/python2.7/email/mime/text.py", line 30, in __init__
    self.set_payload(_text, _charset)
  File "/usr/lib64/python2.7/email/message.py", line 226, in set_payload
    self.set_charset(charset)
  File "/usr/lib64/python2.7/email/message.py", line 262, in set_charset
    self._payload = self._payload.encode(charset.output_charset)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 199-200:
ordinal not in range(128)

Steps to Reproduce: 
Set global locale other to English:

# cat /etc/locale.conf
LANG="cs_CZ.UTF-8"

Set your locale for current session to the same:
export $(cat /etc/locale.conf)

Run this:
/usr/sbin/yum-cron /etc/yum/yum-cron-hourly.conf

Patch is attached, see https://bugs.centos.org/view.php?id=7675

Comment 1 Fedora End Of Life 2015-11-04 13:33:30 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2015-12-02 09:12:14 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 3 christian 2016-01-31 22:38:47 UTC
Why is this one closed? It's not about Fedora, it's about CentOS 7 and so finally for RHEL 7, which still has this bug!

Comment 4 Milan Kerslager 2016-03-16 22:18:29 UTC
See proposed fix at bug #1202680


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