[rhel7/master] Don't call storage.write for dirinstall (#1120206)

Brian C. Lane bcl at redhat.com
Thu Sep 18 18:36:35 UTC 2014


The logic got slightly corrupted with the ostree patches. With this fix
you can do:

anaconda --text --dirinstall --kickstart=./path/to/ks.cfg

to get an installed system in /mnt/sysimage/

Related: rhbz#1120206
---
 pyanaconda/install.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 3c6bbc9..6b2bef6 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -183,9 +183,8 @@ def doInstall(storage, payload, ksdata, instClass):
 
     turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall)
     write_storage_late = (flags.flags.livecdInstall or ksdata.ostreesetup.seen
-                          or ksdata.method.method == "liveimg"
-                          and not flags.flags.dirInstall)
-    if not write_storage_late:
+                          or ksdata.method.method == "liveimg")
+    if not write_storage_late and not flags.flags.dirInstall:
         storage.write()
 
     # Do packaging.
@@ -214,7 +213,7 @@ def doInstall(storage, payload, ksdata, instClass):
     payload.preInstall(packages=packages, groups=payload.languageGroups())
     payload.install()
 
-    if write_storage_late:
+    if write_storage_late and not flags.flags.dirInstall:
         if iutil.getSysroot() != iutil.getTargetPhysicalRoot():
             blivet.setSysroot(iutil.getTargetPhysicalRoot(),
                               iutil.getSysroot())
-- 
1.9.3



More information about the anaconda-patches mailing list