From: Michael Tremer Date: Thu, 17 Oct 2024 18:15:05 +0000 (+0000) Subject: pakfire: Drop the private dir X-Git-Tag: 0.9.30~1026 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f287b8afa58c4ebe51e59c274778eb045f7d71a;p=pakfire.git pakfire: Drop the private dir This is not being used. Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/db.c b/src/libpakfire/db.c index bfc2b76ff..cdfd0bddd 100644 --- a/src/libpakfire/db.c +++ b/src/libpakfire/db.c @@ -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) { diff --git a/src/libpakfire/pakfire.c b/src/libpakfire/pakfire.c index d892cdac4..f0139ca24 100644 --- a/src/libpakfire/pakfire.c +++ b/src/libpakfire/pakfire.c @@ -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)