]> git.ipfire.org Git - pakfire.git/commitdiff
build: Don't try to bind-mount @local if it does not exist
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Apr 2023 11:26:06 +0000 (11:26 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Apr 2023 11:26:06 +0000 (11:26 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index a5653a30f510e84eb4abe6a2660fb6693fb01130..13c4c87f41bfb06c392a7073bffd06c30d3ce94d 100644 (file)
@@ -169,10 +169,12 @@ static int __pakfire_build_setup_repo(struct pakfire* pakfire,
                const char* _path = pakfire_repo_get_path(repo);
 
                // Bind-mount the repository data read-only
-               r = pakfire_jail_bind(build->jail, _path, _path, MS_RDONLY);
-               if (r) {
-                       ERROR(pakfire, "Could not bind-mount the repository at %s: %m\n", _path);
-                       goto ERROR;
+               if (pakfire_path_exists(_path)) {
+                       r = pakfire_jail_bind(build->jail, _path, _path, MS_RDONLY);
+                       if (r) {
+                               ERROR(pakfire, "Could not bind-mount the repository at %s: %m\n", _path);
+                               goto ERROR;
+                       }
                }
        }