]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Require a flag to turn on using tmpfs
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Feb 2025 18:30:09 +0000 (18:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 6 Feb 2025 18:30:09 +0000 (18:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/pakfire.c
src/pakfire/pakfire.h

index c58f9241e1e1ec9e24ba507766193a4b58c1156c..046e23ced524f822a3a1b5f4b957c3d252bb3ab5 100644 (file)
@@ -284,7 +284,7 @@ static int pakfire_setup_path(struct pakfire* self, const char* path) {
                        }
 
                // Mount a tmpfs
-               } else {
+               } else if (pakfire_has_flag(self, PAKFIRE_USE_TMPFS)) {
                        r = mount("pakfire_root", path, "tmpfs", 0, NULL);
                        if (r) {
                                ERROR(self->ctx, "Could not mount tmpfs: %m\n");
index 557393c9cb5cf351f585d0a9c33d489fa205227c..b23ab4b64265c34c1939b8fd80809bd5008be3fa 100644 (file)
@@ -49,7 +49,8 @@ enum pakfire_flags {
        PAKFIRE_FLAGS_STUB              = (1 << 0),
        PAKFIRE_FLAGS_BUILD             = (1 << 1),
        PAKFIRE_FLAGS_BUILD_LOCAL       = (1 << 2),
-       PAKFIRE_USE_SNAPSHOT            = (1 << 3),
+       PAKFIRE_USE_TMPFS               = (1 << 3),
+       PAKFIRE_USE_SNAPSHOT            = (1 << 4),
 };
 
 // Callbacks