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

Vratislav Podzimek vpodzime at redhat.com
Fri Sep 19 05:43:38 UTC 2014


On Thu, 2014-09-18 at 11:36 -0700, Brian C. Lane wrote:
> 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())
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list