From 8b43769f6df0f0727816ea6d7b5b05d8f0e72787 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 17 May 2017 14:09:40 -0400 Subject: [PATCH] rpmostreepayload: Handle /var as a user-specified mountpoint See: https://github.com/ostreedev/ostree/issues/855 Basically, if `/var` is in the user specified mounts, don't override it with the "default ostree" `var`. This allows people to easily keep all of their local state (apart from `/etc`) in a single partition with potentially different quotas etc. --- pyanaconda/packaging/rpmostreepayload.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py index c958d5c4c51d..d240e3f9b1d5 100644 --- a/pyanaconda/packaging/rpmostreepayload.py +++ b/pyanaconda/packaging/rpmostreepayload.py @@ -220,11 +220,11 @@ def prepareMountTargets(self, storage): # Set up bind mounts as if we've booted the target system, so # that %post script work inside the target. - self._binds = [(iutil.getTargetPhysicalRoot(), - iutil.getSysroot() + '/sysroot'), - (varroot, - iutil.getSysroot() + '/var'), - (iutil.getSysroot() + '/usr', None)] + self._binds = [(iutil.getTargetPhysicalRoot(), iutil.getSysroot() + '/sysroot'), + (iutil.getSysroot() + '/usr', None)] + # https://github.com/ostreedev/ostree/issues/855 + if storage.mountpoints.get("/var") is None: + self._binds.append((varroot, iutil.getSysroot() + '/var')) for (src, dest) in self._binds: self._safeExecWithRedirect("mount",