Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 496642

Summary: net-mail/automx automagically uses dev-python/python-memcached at run-time
Product: Gentoo Linux Reporter: Rolf Eike Beer <eike>
Component: Current packagesAssignee: Marc Schiffbauer <mschiff>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 499918    
Bug Blocks:    
Attachments: memcache optional patch

Description Rolf Eike Beer archtester 2014-01-01 02:01:05 UTC
automx/config.py in both 0.9 and 0.10 unconditionally imports memchached, which may have been disabled by use flags. The comments suggest that memchached is still optional, but it looks like it has to be present. This probably needs to be properly fixed upstream.

Reproducible: Always
Comment 1 Marc Schiffbauer gentoo-dev 2014-01-02 14:46:26 UTC
Created attachment 366776 [details, diff]
memcache optional patch
Comment 2 Marc Schiffbauer gentoo-dev 2014-01-02 16:25:35 UTC
For your convenience: I created automx-0.10.1_pre1 in my overlay (mschiff) so you can easily test.

~# layman -a mschiff
~# emerge =net-mail/automx-0.10.1_pre1

-Marc
Comment 3 Rolf Eike Beer archtester 2014-01-02 23:01:16 UTC
The patch works in case you do not have python-memcached installed. If you have it, but no memcached defines are in the config file you will get errors like this:

[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12] mod_wsgi (pid=3691): Exception occurred processing WSGI script '/usr/lib/automx/automx_wsgi.py'.
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12] Traceback (most recent call last):
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]   File "/usr/lib/automx/automx_wsgi.py", line 54, in application
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]     data = Config(environ)
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]   File "/usr/lib64/python2.7/site-packages/automx/config.py", line 122, in __init__
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]     self.memcache = Memcache(self, environ)
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]   File "/usr/lib64/python2.7/site-packages/automx/config.py", line 848, in __init__
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]     self.__mc = memcache.Client([config.get("automx", "memcache")])
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]   File "/usr/lib64/python2.7/ConfigParser.py", line 340, in get
[Thu Jan 02 23:54:25 2014] [error] [client 10.7.7.12]     raise NoOptionError(option, section)
Comment 4 Marc Schiffbauer gentoo-dev 2014-01-03 12:54:48 UTC
Thanks for the Feedback! I added another patch from upstream which should resolve this issue as well. Can you confirm that?

(I added pre2 to my overlay)
Comment 5 Rolf Eike Beer archtester 2014-01-03 14:05:48 UTC
!!! All ebuilds that could satisfy "=net-mail/automx-0.10.1_pre2" have been masked.
!!! One of the following masked packages is required to complete your request:
- net-mail/automx-0.10.1_pre2::mschiff (masked by: corruption)

I'll try to apply the patch by hand.
Comment 6 Rolf Eike Beer archtester 2014-01-03 14:07:38 UTC
I can't, and that is the problem ;)

root@mail:...ff/net-mail/automx # grep FILESDIR automx-0.10.1_pre2.ebuild 
        "$FILESDIR/${PN}-memcache-optional.patch" 
        "$FILESDIR/${PN}-add-missing-memcache-exception.patch"
root@mail:...ff/net-mail/automx # ll files/
total 4
-rw-r--r-- 1 root root 1290 Jan  3 14:01 automx-memcache-optional.patch

The second patch has not been checked in.
Comment 7 Marc Schiffbauer gentoo-dev 2014-01-03 14:18:47 UTC
Sorry! Fixed overlay... I am too busy today ;)
Comment 8 Rolf Eike Beer archtester 2014-01-03 23:07:06 UTC
Patch seems to work. Overlay is still broken because of missing digest.
Comment 9 Marc Schiffbauer gentoo-dev 2014-01-04 03:55:42 UTC
Ok, thanks for the feedback. Expect a new version 0.10.1 coming very soon.

-Marc
BTW: Overlay should be really fixed now.... sorry ;)
Comment 10 Marc Schiffbauer gentoo-dev 2014-02-02 23:34:01 UTC
Thanks for reporting! I dropped this ebuild because 0.10.1 is in tree now.