[initial-setup][PATCH] Adapt Initial Setup to the new way Anaconda handles root path (#1099581)

Vratislav Podzimek vpodzime at redhat.com
Tue May 20 17:27:36 UTC 2014


Anaconda now uses getSysroot and setSysroot functions to get/set the root path.

Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
 initial_setup/__main__.py | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/initial_setup/__main__.py b/initial_setup/__main__.py
index 3e0c868..878169f 100644
--- a/initial_setup/__main__.py
+++ b/initial_setup/__main__.py
@@ -4,6 +4,10 @@ import sys
 import signal
 import pykickstart
 from pyanaconda.users import Users
+from pyanaconda import iutil
+
+# set root to "/", we are now in the installed system
+iutil.setSysroot("/")
 
 signal.signal(signal.SIGINT, signal.SIG_IGN)
 
@@ -19,14 +23,6 @@ if mode == "gui":
     for p in os.environ.get("ANACONDA_WIDGETS_OVERRIDES", "").split(":"):
         gi.overrides.__path__.insert(0, p)
 
-# set the root path to / so the imported spokes
-# know where to apply their changes
-from pyanaconda import constants
-
-# this has to stay in the form constants.ROOT_PATH so it modifies
-# the scalar in anaconda, not the local copy here
-constants.ROOT_PATH = "/"
-
 from pyanaconda.addons import collect_addon_paths
 
 addon_paths = ["/usr/share/initial-setup/modules", "/usr/share/anaconda/addons"]
-- 
1.9.0



More information about the anaconda-patches mailing list