stages/ostree.fillvar: fill the correct var
The idea behind the stage is to provision `var` of the stateroot, i.e. the `var` the is shared amongst all deployments for a given os (indicated by `osname`, e.g. `fedora`, `centos`, ...). For `systemd-tmpfiles` to infer the correct paths, it needs to be run on the deployment. The `var` of the latter needs to be bind- mounted to the `var` of the stateroot, because it is shared. This was always the intention but not what the code did. Fix this by getting the `var` of the stateroot and bind it to the `var` of the deployment. NB: In reality this never mattered since systemd-tmpfiles is also run during system startup.
This commit is contained in:
parent
eefc52333e
commit
0fec32e079
1 changed files with 2 additions and 1 deletions
|
|
@ -111,9 +111,10 @@ def main(tree, options):
|
||||||
serial = dep.get("serial", 0)
|
serial = dep.get("serial", 0)
|
||||||
|
|
||||||
deployment = ostree.deployment_path(tree, osname, ref, serial)
|
deployment = ostree.deployment_path(tree, osname, ref, serial)
|
||||||
|
var = os.path.join(tree, "ostree", "deploy", osname, "var")
|
||||||
|
|
||||||
with MountGuard() as mgr:
|
with MountGuard() as mgr:
|
||||||
mgr.mount(f"{deployment}/var", f"{deployment}/var")
|
mgr.mount(var, f"{deployment}/var")
|
||||||
populate_var(deployment)
|
populate_var(deployment)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue