Set the python path within anaconda
Instead of manipulating the path outside of anaconda, which can get
tricky when starting anaconda from ssh, instead update the path inside anaconda itself. This means we can't get things like os, sys, etc.. from /tmp/updates/, but an updates image can replace these modules by using the full path to them (e.g. /usr/lib/python...) --- anaconda | 2 ++ data/systemd/anaconda@.service | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/anaconda b/anaconda index b76af4d..4959a87 100755 --- a/anaconda +++ b/anaconda @@ -277,6 +277,8 @@ def parseOptions(argv=None, cmdline=None): return (opts, args, op.deprecated_bootargs) def setupPythonPath(): + # First add our updates path + sys.path.insert(0, '/tmp/updates/') sys.path.append('/usr/share/system-config-date') def setupEnvironment(): diff --git a/data/systemd/anaconda@.service b/data/systemd/anaconda@.service index 903df7a..03ecabb 100644 --- a/data/systemd/anaconda@.service +++ b/data/systemd/anaconda@.service @@ -3,7 +3,7 @@ Description=Anaconda After=anaconda.target [Service] -Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin PYTHONPATH=/tmp/updates +Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin Type=oneshot WorkingDirectory=/root ExecStart=/usr/sbin/anaconda -- 1.7.10.2 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list |
Set the python path within anaconda
On Wed, May 30, 2012 at 04:02:05PM -0700, Jesse Keating wrote:
> Instead of manipulating the path outside of anaconda, which can get > tricky when starting anaconda from ssh, instead update the path inside > anaconda itself. This means we can't get things like os, sys, etc.. > from /tmp/updates/, but an updates image can replace these modules by > using the full path to them (e.g. /usr/lib/python...) Ack -- Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT) _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list |
| All times are GMT. The time now is 09:48 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.