Bug 756090 - mock (consolehelper) won't maintain PYTHONPATH
Summary: mock (consolehelper) won't maintain PYTHONPATH
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-22 16:48 UTC by Turbo Fredriksson
Modified: 2011-11-23 15:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-23 15:29:22 UTC
Type: ---


Attachments (Terms of Use)

Description Turbo Fredriksson 2011-11-22 16:48:03 UTC
Description of problem:
When running 'mock' (not .../sbin/mock), i get:
----- s n i p -----
[build@semldxcambria ~]$ mock --version
Traceback (most recent call last):
  File "/opt/fedora/mock/python2.7-64_1.1.16/sbin/mock", line 65, in ?
    from mockbuild.trace_decorator import traceLog, decorate
  File "/opt/fedora/mock/python2.7-64_1.1.16/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 10, in ?
    from peak.util.decorators import rewrap, decorate
ImportError: No module named peak.util.decorators
----- s n i p -----

However, this (decoratortools) is in my (python)path:
----- s n i p -----
[build@semldxcambria ~]$ /bin/env python
Python 2.7.1 (r271:86832, Jun  9 2011, 16:18:33) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from peak.util.decorators import rewrap, decorate
>>> 
----- s n i p -----

Version-Release number of selected component (if applicable):
This is mock version 1.1.16, python 2.7.1.

How reproducible:
Every time. Have yet to be able to run it successfully.

Steps to Reproduce:
No idea. This might be a problem with my setup or config of consolehelper... ?

The files /etc/pam.d/mock and /etc/security/console.apps/mock are all original from the mock dist. So is all the config files.

Additional info:
Mock have been installed in a non /usr based path, so have gcc, decoratortools and python, hence the PYTHONPATH (etc).


I've tried to setup sudo access for this, but that gives the same problem:
----- s n i p -----
[build@semldxcambria ~]$ /opt/fedora/mock/python2.7-64_1.1.16/sbin/mock -r centos-5-x86_64

ERROR: [Errno 1] Operation not permitted

ERROR: The most common cause for this error is trying to run /usr/sbin/mock as an unprivileged user.
ERROR: Check your path to make sure that /usr/bin/ is listed before /usr/sbin, or manually run /usr/bin/mock to see if that fixes this problem.

[build@semldxcambria ~]$ sudo /opt/fedora/mock/python2.7-64_1.1.16/sbin/mock -r centos-5-x86_64
python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
[fixing the LD_LIBRARY_PATH tingie - adding the pats to /etc/ld.so.conf]
[build@semldxcambria ~]$ sudo /opt/fedora/mock/python2.7-64_1.1.16/sbin/mock -r centos-5-x86_64
Traceback (most recent call last):
  File "/opt/fedora/mock/python2.7-64_1.1.16/sbin/mock", line 65, in <module>
    from mockbuild.trace_decorator import traceLog, decorate
  File "/opt/fedora/mock/python2.7-64_1.1.16/lib/python2.7/site-packages/mockbuild/trace_decorator.py", line 10, in <module>
    from peak.util.decorators import rewrap, decorate
ImportError: No module named peak.util.decorators
----- s n i p -----


PS. This is a CentOS 5.6 client...
PS2. For me, this is 'Severity: urgent', but since others seems to be able to get it to work, i'll let you decide :).

Comment 1 Turbo Fredriksson 2011-11-23 15:29:22 UTC
Lots of checking, googling and help from coworker, this bug is invalid. It was my consolehelper (usermode package) that was to old (1.88-3.el5.2). It did not have the fix for KEEP_ENV_VARS (that came in 1.91). I've backported the patch for my system, so no need for this bug to be processed.

For anyone interested, the patch is at:

https://fedorahosted.org/usermode/changeset?old_path=&old=1250%3A389463d46e9e&new_path=&new=1250%3A389463d46e9e

And applied somewhat clean to my version.


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