Apply "link_cargo_registry" in PKGBUILD ver. check

This commit is contained in:
Stephen Seo 2023-07-26 10:49:27 +09:00
parent c013e6b37b
commit b7c2697f6a
1 changed files with 11 additions and 0 deletions

View File

@ -665,6 +665,17 @@ def get_pkgbuild_version(
other_state["chroot"],
]
post_command_list = ["--", "-s", "-r", "-c", "--nobuild"]
if "link_cargo_registry" in pkg_state[pkg]:
command_list.insert(2, "-d")
command_list.insert(
3,
f'{os.environ["HOME"]}/.cargo/registry:/build/.cargo/registry',
)
command_list.insert(4, "-d")
command_list.insert(
5,
f'{os.environ["HOME"]}/.cargo/git:/build/.cargo/git',
)
for dep in pkg_state[pkg]["other_deps"]:
dep_fullpath = get_latest_pkg(dep, "/var/cache/pacman/pkg")
if not dep_fullpath: