FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > EPEL Development

 
 
LinkBack Thread Tools
 
Old 05-30-2012, 11:02 PM
Jesse Keating
 
Default 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
 
Old 05-31-2012, 04:17 PM
"Brian C. Lane"
 
Default 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
 

Thread Tools




All times are GMT. The time now is 11:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org