Bug 912540

Summary: abrt.pth prevents python virtualenv creation
Product: [Fedora] Fedora Reporter: Olivier Samyn <code>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED ERRATA QA Contact: Jiri Moskovcak <jmoskovc>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: abrt-devel-list, dfediuck, dvlasenk, iprikryl, jfilak, jmoskovc, mmilata, mtoman, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 912672 (view as bug list) Environment:
Last Closed: 2013-03-25 23:02:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 912672, 968345    

Description Olivier Samyn 2013-02-18 23:23:52 UTC
Description of problem:
I simply tried to create a python virtualenv using the --system-site-packages option, and got an exception when site.py tries to load the abrt_exception_handler package.

Version-Release number of selected component (if applicable):
abrt-addon-python-2.1.1-1.fc18.x86_64


Steps to Reproduce:
Run the following command:
virtualenv --system-site-packages tst
  
Actual results:
Traceback (most recent call last):
  File "/home/olivier/tmp/tst/lib64/python2.7/site.py", line 682, in <module>
    main()
  File "/home/olivier/tmp/tst/lib64/python2.7/site.py", line 665, in main
    paths_in_sys = virtual_addsitepackages(paths_in_sys)
  File "/home/olivier/tmp/tst/lib64/python2.7/site.py", line 623, in virtual_addsitepackages
    return addsitepackages(known_paths, sys_prefix=sys.real_prefix)
  File "/home/olivier/tmp/tst/lib64/python2.7/site.py", line 278, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "/home/olivier/tmp/tst/lib64/python2.7/site.py", line 203, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/home/olivier/tmp/tst/lib64/python2.7/site.py", line 172, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
ImportError: No module named abrt_exception_handler
ERROR: The executable tst/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/home/olivier/tmp' (should be u'/home/olivier/tmp/tst')
ERROR: virtualenv is not compatible with this system or executable


Expected results:
Virtualenv creation

Additional info:
After checking what happens in site.py, it seems that python tries to load the abrt.pth file.
Inside that one, the abrt_exception_handler module is imported.

Since the abrt_exception_handler module is installed under /usr/lib64 and abrt.pth is installed under /usr/lib, site.py does not found the required module.

Simply moving abrt.pth from /usr/lib/python2.7/site-packages/ to /usr/lib64/python2.7/site-packages/ solves the problem.

It's probably a simple packaging problem.

Comment 1 Jiri Moskovcak 2013-02-19 11:35:32 UTC
commit e6d1764c75a177a0f87e6bf54f75b0caef05f24d
Author: Jiri Moskovcak <jmoskovc>
Date:   Tue Feb 19 10:53:06 2013 +0100

    move abrt.pth to arch specific location rhbz#912540

Comment 2 Fedora Update System 2013-03-20 08:55:26 UTC
abrt-2.1.2-1.fc18,libreport-2.1.2-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/abrt-2.1.2-1.fc18,libreport-2.1.2-1.fc18

Comment 3 Fedora Update System 2013-03-22 00:23:56 UTC
Package abrt-2.1.2-1.fc18, libreport-2.1.2-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.1.2-1.fc18 libreport-2.1.2-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4176/abrt-2.1.2-1.fc18,libreport-2.1.2-1.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-03-22 21:21:24 UTC
Package abrt-2.1.2-2.fc18, libreport-2.1.2-2.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.1.2-2.fc18 libreport-2.1.2-2.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-4176/abrt-2.1.2-2.fc18,libreport-2.1.2-2.fc18
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-03-25 23:02:30 UTC
abrt-2.1.2-2.fc18, libreport-2.1.2-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.