blivet: Split ROOT_PATH usage into getTargetPhysicalRoot()/getSysroot()
Vratislav Podzimek
vpodzime at redhat.com
Tue Apr 29 08:36:32 UTC 2014
On Sat, 2014-04-26 at 17:20 +0000, Colin Walters wrote:
> This mirrors the change to Anaconda, in order to enable OSTree
> support.
>
>
> For OSTree, the location of the OS checkout (and e.g. /etc/fstab) is
> really in /ostree/deploy/$osname/deploy/$revision/etc/fstab.
>
>
> In order to properly support OSTree, Blivet will need to gain an
> understanding of the separation between the physical system / and the
> target root.
>
>
> This patch will be used in Anaconda, which will call setSysroot()
> attribute after the root being installed is laid out.
>
>
> After that, when we call write(), the fstab data will be correctly
> written into the target root.
> ---
> blivet/__init__.py | 106
> ++++++++++++++++++++++++++++++++--------------
> blivet/devicelibs/dasd.py | 4 +-
> blivet/fcoe.py | 8 ++--
> blivet/iscsi.py | 14 +++---
> blivet/util.py | 4 +-
> blivet/zfcp.py | 6 +--
> 6 files changed, 93 insertions(+), 49 deletions(-)
>
I believe that at least this code:
> diff --git a/blivet/util.py b/blivet/util.py
> index d90b9e9..0da09d9 100644
> --- a/blivet/util.py
> +++ b/blivet/util.py
> @@ -279,13 +279,13 @@ def makedirs(path):
>
> def copy_to_system(source):
> # do the import now because enable_installer_mode() has finally been called.
> - from . import ROOT_PATH
> + from . import _sysroot
>
> if not os.access(source, os.R_OK):
> log.info("copy_to_system: source '%s' does not exist.", source)
> return False
>
> - target = ROOT_PATH + source
> + target = _sysroot + source
> target_dir = os.path.dirname(target)
> log.debug("copy_to_system: '%s' -> '%s'.", source, target)
should use the getSysroot() function.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list