pmb.chroot.init: home links: create missing dirs (!1850)
When initializing the building chroots, some symlinks are created to /mnt/pmbootstrap* dirs. With upcoming rust-related symlinks, they will point to subdirs in /mnt/pmbootstrap-rust, such as /mnt/pmbootstrap-rust/registry/cache. Create this directory structure if it does not exist.
This commit is contained in:
parent
02e514f4d3
commit
b93e83d8b3
|
@ -104,6 +104,8 @@ def init(args, suffix="native"):
|
|||
link_dir = os.path.dirname(link_name)
|
||||
if not os.path.exists(chroot + link_dir):
|
||||
pmb.chroot.user(args, ["mkdir", "-p", link_dir], suffix)
|
||||
if not os.path.exists(chroot + target):
|
||||
pmb.chroot.root(args, ["mkdir", "-p", target], suffix)
|
||||
pmb.chroot.user(args, ["ln", "-s", target, link_name], suffix)
|
||||
pmb.chroot.root(args, ["chown", "pmos:pmos", target],
|
||||
suffix)
|
||||
|
|
Loading…
Reference in New Issue