]> git.seodisparate.com - AnotherAURHelper/commitdiff
Apply "link_cargo_registry" in PKGBUILD ver. check
authorStephen Seo <seo.disparate@gmail.com>
Wed, 26 Jul 2023 01:49:27 +0000 (10:49 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Wed, 26 Jul 2023 01:49:27 +0000 (10:49 +0900)
update.py

index e3850ef4952b4fd4ed0cdfb65d05739a05c353aa..6b049d69535c3c2eef9d020f9486e2137afe9138 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -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: