]> git.ipfire.org Git - pakfire.git/commitdiff
configure: Rename PAKFIRE_*_PATH to PAKFIRE_*_DIR
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Sep 2021 14:50:56 +0000 (14:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Sep 2021 14:50:56 +0000 (14:50 +0000)
For consistency.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
configure.ac
src/libpakfire/build.c
src/libpakfire/keystore.c
src/libpakfire/pakfire.c
src/libpakfire/repo.c
src/libpakfire/request.c

index b73afbaf5669086235c5e65b047df95d57dae458..080f0a6203a770eed0ebe575a4cd1b8ecb01e0f2 100644 (file)
@@ -251,9 +251,9 @@ AC_ARG_WITH([systemdsystemunitdir],
 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
 AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
 
-AC_DEFINE_UNQUOTED([PAKFIRE_CONFIG_PATH], ["${sysconfdir}/${PACKAGE_NAME}"],
+AC_DEFINE_UNQUOTED([PAKFIRE_CONFIG_DIR], ["${sysconfdir}/${PACKAGE_NAME}"],
        [The path where Pakfire stores configuration files])
-AC_DEFINE_UNQUOTED([PAKFIRE_CACHE_PATH], ["/var/cache/${PACKAGE_NAME}"],
+AC_DEFINE_UNQUOTED([PAKFIRE_CACHE_DIR], ["/var/cache/${PACKAGE_NAME}"],
        [The path where Pakfire stores temporary data])
 AC_DEFINE_UNQUOTED([PAKFIRE_PRIVATE_DIR], ["/var/lib/${PACKAGE_NAME}"],
        [The path where Pakfire stores its private data])
index 1eda2e07b5255a65bda12e105a89516d25e9c264..cf564a127b047aeacee47efe72138c138fb4eb21 100644 (file)
@@ -832,7 +832,7 @@ static int pakfire_build_enable_repos(struct pakfire* pakfire) {
 
        // Make path for configuration file
        r = pakfire_make_path(pakfire, repopath,
-               PAKFIRE_CONFIG_PATH "/repos/" PAKFIRE_REPO_LOCAL ".repo");
+               PAKFIRE_CONFIG_DIR "/repos/" PAKFIRE_REPO_LOCAL ".repo");
        if (r < 0)
                goto ERROR;
 
index 74e546cd91bab085e8527d97697d41118dcde3fb..6e5b8bb2ce3bc70d8d07390d3f489207e5390715 100644 (file)
@@ -104,7 +104,7 @@ ERROR:
 }
 
 int pakfire_keystore_init(struct pakfire* pakfire, gpgme_ctx_t* ctx) {
-       char path[PATH_MAX] = PAKFIRE_CACHE_PATH "/tmp/pakfire-keystore.XXXXXX";
+       char path[PATH_MAX] = PAKFIRE_CACHE_DIR "/tmp/pakfire-keystore.XXXXXX";
        char* tmp = NULL;
 
        // Initialise GPGME
index 56e053d60d7ee0f05ef89b3294447c87f7167f69..5b21cf5720cabffa9cad7ae20d87dc454f8379b8 100644 (file)
@@ -556,7 +556,7 @@ static int pakfire_safety_checks(struct pakfire* pakfire) {
 static int pakfire_read_repo_config(struct pakfire* pakfire) {
        char path[PATH_MAX];
 
-       int r = pakfire_make_path(pakfire, path, PAKFIRE_CONFIG_PATH "/repos");
+       int r = pakfire_make_path(pakfire, path, PAKFIRE_CONFIG_DIR "/repos");
        if (r < 0)
                return 1;
 
@@ -696,7 +696,7 @@ static int pakfire_read_config(struct pakfire* pakfire, const char* path) {
 
        // Use default path if none set
        if (!path) {
-               int r = pakfire_make_path(pakfire, default_path, PAKFIRE_CONFIG_PATH "/general.conf");
+               int r = pakfire_make_path(pakfire, default_path, PAKFIRE_CONFIG_DIR "/general.conf");
                if (r < 0)
                        return 1;
 
@@ -934,7 +934,7 @@ PAKFIRE_EXPORT int pakfire_create(struct pakfire** pakfire, const char* path,
 
        // Set cache path
        pakfire_string_format(p->cache_path, "%s/%s/%s/%s",
-               PAKFIRE_CACHE_PATH, p->distro.id, p->distro.version_id, p->arch);
+               PAKFIRE_CACHE_DIR, p->distro.id, p->distro.version_id, p->arch);
 
        // Set keystore path
        r = pakfire_make_path(p, p->keystore_path, KEYSTORE_DIR);
@@ -1201,7 +1201,7 @@ PAKFIRE_EXPORT int pakfire_clean(struct pakfire* pakfire, int flags) {
        }
 
        // Remove the cache
-       return pakfire_rmtree(PAKFIRE_CACHE_PATH, 0);
+       return pakfire_rmtree(PAKFIRE_CACHE_DIR, 0);
 }
 
 PAKFIRE_EXPORT int pakfire_refresh(struct pakfire* pakfire, int flags) {
index 39765388bb01f49e4eb8a271e8f1bc3631b08544..dedd6bacd8aef78902b792a1ca6f6b610ed0a981 100644 (file)
@@ -125,7 +125,7 @@ static int pakfire_repo_import_key(struct pakfire_repo* repo, const char* url) {
        const char* name = pakfire_repo_get_name(repo);
        DEBUG(repo->pakfire, "Importing key for repository %s from %s...\n", name, url);
 
-       char path[PATH_MAX] = PAKFIRE_CACHE_PATH "/tmp/XXXXXX";
+       char path[PATH_MAX] = PAKFIRE_CACHE_DIR "/tmp/XXXXXX";
        struct pakfire_key** keys = NULL;
 
        // Allocate a temporary file name
index 769177b2889692ab14914aa2260703df6e700cad..59f233815e01b32a381cd652b19fc3230b3e68fc 100644 (file)
@@ -490,7 +490,7 @@ static int pakfire_request_cleanup_file(
 static int pakfire_request_add_url(struct pakfire_request* request, int action,
                const char* url, int extra_flags) {
        struct pakfire_downloader* downloader;
-       char path[PATH_MAX] = PAKFIRE_CACHE_PATH "/tmp/XXXXXX";
+       char path[PATH_MAX] = PAKFIRE_CACHE_DIR "/tmp/XXXXXX";
 
        // Allocate a temporary file name
        FILE* f = pakfire_mktemp(path);