[PATCH] Set the python path within anaconda

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux