Skip to content

Commit

Permalink
rpmostreepayload: Handle /var as a user-specified mountpoint
Browse files Browse the repository at this point in the history
See: ostreedev/ostree#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.

Resolves: rhbz#1459623
  • Loading branch information
cgwalters committed Jun 8, 2017
1 parent 9054c08 commit 2d4c527
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pyanaconda/packaging/rpmostreepayload.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2d4c527

Please sign in to comment.