Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378379 - sys-apps/portage: elog mail fails for certain ebuilds with Python 3.2 (python upstream issue 12283)
Summary: sys-apps/portage: elog mail fails for certain ebuilds with Python 3.2 (python...
Status: RESOLVED UPSTREAM
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL: http://bugs.python.org/issue12283
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-08 19:08 UTC by Chris Mayo
Modified: 2011-08-09 01:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emergeinfo,5.30 KB, text/plain)
2011-08-08 19:17 UTC, Chris Mayo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Mayo 2011-08-08 19:08:04 UTC
With default interpreter set to python3.2 and in make.conf:

PORTAGE_ELOG_CLASSES="warn error log qa"
PORTAGE_ELOG_SYSTEM="save mail"
PORTAGE_ELOG_MAILFROM="portage"

A few emerges fail to send their elog email, one example is x11-libs/qt-xmlpatterns-4.7.3:

>>> Recording x11-libs/qt-xmlpatterns in "world" favorites file...
Traceback (most recent call last):
  File "/usr/bin/emerge", line 43, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1906, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 437, in action_build
    retval = mergetask.merge()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1066, in merge
    rval = self._merge()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1416, in _merge
    self._main_loop()
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1566, in _main_loop
    self._poll_loop()
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 193, in _poll_loop
    handler(f, event)
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 215, in _output_handler
    self._unregister_if_appropriate(event)
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 61, in _unregister_if_appropriate
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 46, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 128, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/EbuildMerge.py", line 56, in _merge_exit
    self.wait()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 46, in wait
    self._wait_hook()
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 128, in _wait_hook
    self._exit_listener_stack.pop()(self)
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 378, in _install_exit
    self._unlock_builddir()
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 274, in _unlock_builddir
    portage.elog.elog_process(self.pkg.cpv, self.settings)
  File "/usr/lib64/portage/pym/portage/elog/__init__.py", line 167, in elog_process
    m.process(mysettings, str(key), mod_logentries, mod_fulllog)
  File "/usr/lib64/portage/pym/portage/elog/mod_mail.py", line 39, in process
    portage.mail.send_mail(mysettings, mymessage)
  File "/usr/lib64/portage/pym/portage/mail.py", line 170, in send_mail
    myconn.sendmail(myfrom, myrecipient, message_str)
  File "/usr/lib64/python3.2/smtplib.py", line 739, in sendmail
    (code,resp) = self.data(msg)
  File "/usr/lib64/python3.2/smtplib.py", line 495, in data
    q = _quote_periods(msg)
  File "/usr/lib64/python3.2/smtplib.py", line 165, in _quote_periods
    return re.sub(br'(?m)^\.', '..', bindata)
  File "/usr/lib64/python3.2/re.py", line 167, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: sequence item 1: expected bytes, str found


Using eselect to set python3.1 before emergeing and the email is sent:

QA: other
QA Notice: Package has poor programming practices which may compile
           fine but exhibit random runtime failures.
../../include/QtCore/../../src/corelib/tools/qshareddata.h:250: warning: dereferencing pointer \u2018<anonymous>\u2019 does break strict-aliasing rules
Please do not file a Gentoo bug and instead report the above QA
issues directly to the upstream developers of this software.
Homepage: http://qt.nokia.com/
Comment 1 Chris Mayo 2011-08-08 19:17:48 UTC
Created attachment 282607 [details]
emerge --info
Comment 2 Zac Medico gentoo-dev 2011-08-09 00:56:17 UTC
It's a python bug, fixed in python-3.2.1 I guess:

   http://bugs.python.org/issue12283

I don't see any way to work around it on the python side.