]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Drop the private dir
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Oct 2024 18:15:05 +0000 (18:15 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Oct 2024 18:15:05 +0000 (18:15 +0000)
This is not being used.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/db.c
src/libpakfire/pakfire.c

index bfc2b76ff53b35f6387cbceb12e8e73f8da3b808..cdfd0bdddb2119e77902c30f75782b92beb44fa9 100644 (file)
@@ -706,6 +706,11 @@ int pakfire_db_open(struct pakfire_db** db, struct pakfire* pakfire, int flags)
        if (r)
                goto END;
 
+       // Create the parent directory
+       r = pakfire_mkparentdir(o->path, 0755);
+       if (r < 0)
+               goto END;
+
        // Try to open the sqlite3 database file
        r = sqlite3_open_v2(o->path, &o->handle, sqlite3_flags, NULL);
        if (r != SQLITE_OK) {
index d892cdac41a46fd5cd428fc46e437a6858cded33..f0139ca243ec116ab0e3a280d35b9ebea3676eea 100644 (file)
@@ -758,7 +758,6 @@ ERROR:
 PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
                const char* path, const char* arch, FILE* conf, int flags) {
        struct pakfire* p = NULL;
-       char private_dir[PATH_MAX];
        int r;
 
        // Default to the native architecture
@@ -946,18 +945,6 @@ PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx*
        if (*p->distro.slogan)
                CTX_DEBUG(p->ctx, "    slogan     = %s\n", p->distro.slogan);
 
-       // Make path for private files
-       r = pakfire_path(p, private_dir, "%s", PAKFIRE_PRIVATE_DIR);
-       if (r)
-               goto ERROR;
-
-       // Make sure that our private directory exists
-       r = pakfire_mkdir(private_dir, 0755);
-       if (r) {
-               CTX_ERROR(p->ctx, "Could not create private directory %s: %m\n", private_dir);
-               goto ERROR;
-       }
-
        // Bump RLIMIT_NOFILE to maximum
        r = pakfire_rlimit_set(p, PAKFIRE_RLIMIT_NOFILE_MAX);
        if (r)