Bug 87938 - python redhat-config-* don't work if PYTHONHOME is set
python redhat-config-* don't work if PYTHONHOME is set
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-kickstart (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
Depends On:
  Show dependency treegraph
Reported: 2003-04-03 16:04 EST by jmccann
Modified: 2015-01-14 18:19 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-21 16:42:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jmccann 2003-04-03 16:04:16 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401

Description of problem:
The redhat-config-* python scripts don't function if the user has set PYTHONHOME.

The redhat-config-kickstart script, for example, explicitly sets PYTHONPATH so
that if the user sets a different PYTHONPATH the script will still function.

On our systems we have a custom python version installed in /usr/local and we
use PYTHONHOME=/usr/local to translate library paths.  This breaks

I am able to solve the problem by adding the following to all the redhat python
driver scripts:
export PYTHONHOME=/usr

I think this is a pretty failsafe solution.

Is it possible to have this added officially?

Version-Release number of selected component (if applicable):
Version 8.0 through 9

How reproducible:

Steps to Reproduce:
1. set PYTHONHOME to other than /usr
2. start redhat-config-kickstart


Actual Results:  Can't find necessary python modules.

Expected Results:  Starts up.

Additional info:
Comment 1 Brent Fox 2003-04-03 16:40:10 EST
msw, does this make sense to add?
Comment 3 Brent Fox 2003-05-21 16:42:36 EDT
This seems to be a pretty uncommon problem, so I'm reluctant to go change all
the redhat-config tools.  Even if I make those changes, other Python apps that
do not manually export PYTHONHOME will still break.  This makes me think that
this is not the right way to solve the problem.

I am going to close this as 'wontfix' but I will reconsider if we start to see
more of these reports in the future.
Comment 4 jmccann 2003-05-21 17:01:04 EDT
Let me try to explain a bit better.  Here's the script I'm talking about:

export PYTHONPATH=/usr/share/redhat-config-kickstart
/usr/bin/python /usr/share/redhat-config-kickstart/redhat-config-kickstart.py

One way to think about this is that PYTHONPATH and PYTHONHOME are coupled.  If
you force a specific PYTHONPATH and python version (with /usr/bin/python) you
should also reset PYTHONHOME.  Now if you did the following it would be a
different story:

export PYTHONPATH=/usr/share/redhat-config-kickstart:${PYTHONPATH}
python /usr/share/redhat-config-kickstart/redhat-config-kickstart.py

> Even if I make those changes, other Python apps that
> do not manually export PYTHONHOME will still break.

Actually that isn't true.  Most applications don't force a specific PYTHONPATH
(or override the user's settings) and python version.  If they did then they
should reset PYTHONHOME.

It's fine if you don't want to do it but I don't think it is technically correct.
Comment 5 jmccann 2003-05-21 17:12:09 EDT
Sorry, one more thing.  As a practical matter the support cost of users being
able to hose all of the redhat-config-* tools simply by setting one enviroment
variable is large.  The risk of this patch == 0.

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