diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py index c9ac6e21e60..b5a38325ffa 100644 --- a/pyanaconda/packaging/rpmostreepayload.py +++ b/pyanaconda/packaging/rpmostreepayload.py @@ -221,11 +221,14 @@ 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 = [(varroot, iutil.getSysroot() + '/var'), - (iutil.getSysroot() + '/usr', None), + self._binds = [(iutil.getSysroot() + '/usr', None), (iutil.getTargetPhysicalRoot(), iutil.getSysroot() + "/sysroot"), (iutil.getTargetPhysicalRoot() + "/boot", iutil.getSysroot() + "/boot")] + # https://github.com/ostreedev/ostree/issues/855 + if storage.mountpoints.get("/var") is None: + binds.append((varroot, iutil.getSysroot() + '/var')) + # Bind mount filesystems from /mnt/sysimage to the ostree root; perhaps # in the future consider `mount --move` to make the output of `findmnt` # not induce blindness.