[rhel7-branch 21/29] Don't call storage.write for dirinstall (#1120206)

bcl installerbot-noreply at redhat.com
Tue Jun 2 00:31:22 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

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
(cherry picked from commit edb7da857895b59e1b0fceda6bc0320ab3ca50fd)

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

diff --git a/pyanaconda/install.py b/pyanaconda/install.py
index 090b0a7..1fbfe36 100644
--- a/pyanaconda/install.py
+++ b/pyanaconda/install.py
@@ -180,9 +180,8 @@ def doInstall(storage, payload, ksdata, instClass):
 
     turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall, callbacks=callbacks_reg)
     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.
@@ -220,7 +219,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())


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/cca497c67d60fba0045712971075523a3eafb69e


More information about the anaconda-patches mailing list