mounts/ostree.deployment: rename var root -> deploy_root
It makes things a little more clear to know the variable is pointing to the path of the deployment.
This commit is contained in:
parent
0da68e9af5
commit
e43abe1a9c
1 changed files with 8 additions and 8 deletions
|
|
@ -105,22 +105,22 @@ class OSTreeDeploymentMount(mounts.MountService):
|
|||
# - `mount(8)`
|
||||
self.bind_mount(tree, tree)
|
||||
|
||||
root = ostree.deployment_path(tree, osname, ref, serial)
|
||||
deploy_root = ostree.deployment_path(tree, osname, ref, serial)
|
||||
|
||||
print(f"Deployment root at '{os.path.relpath(root, tree)}'")
|
||||
print(f"Deployment root at '{os.path.relpath(deploy_root, tree)}'")
|
||||
|
||||
var = os.path.join(tree, "ostree", "deploy", osname, "var")
|
||||
boot = os.path.join(tree, "boot")
|
||||
|
||||
self.mountpoint = root
|
||||
self.bind_mount(root, root) # prepare to move it later
|
||||
self.mountpoint = deploy_root
|
||||
self.bind_mount(deploy_root, deploy_root) # prepare to move it later
|
||||
|
||||
self.bind_mount(tree, os.path.join(root, "sysroot"))
|
||||
self.bind_mount(var, os.path.join(root, "var"))
|
||||
self.bind_mount(boot, os.path.join(root, "boot"))
|
||||
self.bind_mount(tree, os.path.join(deploy_root, "sysroot"))
|
||||
self.bind_mount(var, os.path.join(deploy_root, "var"))
|
||||
self.bind_mount(boot, os.path.join(deploy_root, "boot"))
|
||||
|
||||
subprocess.run([
|
||||
"mount", "--move", root, tree,
|
||||
"mount", "--move", deploy_root, tree,
|
||||
], check=True)
|
||||
|
||||
self.mountpoint = tree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue