]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
build: Use pakfire_jail_bind to bind-mount local repository
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 09:35:17 +0000 (09:35 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 17 Aug 2022 09:35:17 +0000 (09:35 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index 197621e45cbb7d595699a82e166c95b240f7541f..4f5e3e79a3936dfca0d39fd88422a69c7d5f1888 100644 (file)
@@ -96,7 +96,7 @@ static int pakfire_build_has_flag(struct pakfire_build* build, int flag) {
 }
 
 /*
-       This function enables the local repository so that it can be access by
+       This function enables the local repository so that it can be accessed by
        a pakfire instance running inside the chroot.
 */
 static int pakfire_build_enable_repos(struct pakfire_build* build) {
@@ -121,7 +121,7 @@ static int pakfire_build_enable_repos(struct pakfire_build* build) {
        }
 
        // Bind-mount the repository data read-only
-       r = pakfire_bind(build->pakfire, path, NULL, MS_RDONLY);
+       r = pakfire_jail_bind(build->jail, path, path, MS_RDONLY);
        if (r) {
                ERROR(build->pakfire, "Could not bind-mount the repository at %s: %m\n", path);
                goto ERROR;