]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Rename pakfire_ctx() -> pakfire_get_ctx()
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 10:16:20 +0000 (10:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 10:16:20 +0000 (10:16 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
22 files changed:
src/pakfire/archive.c
src/pakfire/archive_writer.c
src/pakfire/build.c
src/pakfire/db.c
src/pakfire/dist.c
src/pakfire/file.c
src/pakfire/filelist.c
src/pakfire/jail.c
src/pakfire/linter.c
src/pakfire/oci.c
src/pakfire/package.c
src/pakfire/packager.c
src/pakfire/pakfire.c
src/pakfire/pakfire.h
src/pakfire/parser.c
src/pakfire/parser/grammar.y
src/pakfire/problem.c
src/pakfire/pwd.c
src/pakfire/repo.c
src/pakfire/snapshot.c
src/pakfire/stripper.c
src/pakfire/transaction.c

index 8d21b28f15ea092e221bd721d4d3bf5113cbccb8..ec8806dd1625c998c602ce3f73d2b78dd05113ad 100644 (file)
@@ -705,7 +705,7 @@ int pakfire_archive_open(struct pakfire_archive** archive,
                return -errno;
 
        // Store a reference to the context
-       a->ctx = pakfire_ctx(pakfire);
+       a->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to pakfire
        a->pakfire = pakfire_ref(pakfire);
index cb7c3c60e249b261c3fd8fc6c9aef7b4e8e1831e..d90f096fff9867921121d267d3899539c80ed1a2 100644 (file)
@@ -282,7 +282,7 @@ int pakfire_archive_writer_create(struct pakfire_archive_writer** writer,
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        self->pakfire = pakfire_ref(pakfire);
index 6fca0b7e17dac55e3e412dede7e8519e865378b7..70609e640fecd858e3e0618ec96fa943cdec261a 100644 (file)
@@ -2824,7 +2824,7 @@ int pakfire_build_clean(struct pakfire* pakfire, int flags) {
        struct pakfire_repo* local = NULL;
        int r = 0;
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Fetch local repository
        local = pakfire_get_repo(pakfire, PAKFIRE_REPO_LOCAL);
index b280a876bd32504fba0d1027840302a77429529f..73ed487ef1b966100dfc306415f6f85d109c3e02 100644 (file)
@@ -696,7 +696,7 @@ int pakfire_db_open(struct pakfire_db** db, struct pakfire* pakfire, int flags)
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to pakfire
        self->pakfire = pakfire_ref(pakfire);
index dd923bc8d3fbd1477cf93f78b0049ff6a28fce3c..1f8d9bec4195609593359935fe214a6123cee2e3 100644 (file)
@@ -154,7 +154,7 @@ int pakfire_read_makefile(struct pakfire_parser** parser, struct pakfire* pakfir
        int r;
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Create a new parser
        r = pakfire_parser_create(parser, pakfire, NULL, NULL, PAKFIRE_PARSER_FLAGS_EXPAND_COMMANDS);
@@ -460,7 +460,7 @@ int pakfire_dist(struct pakfire* pakfire,
        int r;
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Load makefile
        r = pakfire_read_makefile(&makefile, pakfire, path, &error);
index 5323e0c56cdfa277437aab29cf045043d52da59f..176fde31a0992d6bb357938b946b54abc20fadd5 100644 (file)
@@ -388,7 +388,7 @@ int pakfire_file_create(struct pakfire_file** file,
                return -errno;
 
        // Store a reference to the context
-       f->ctx = pakfire_ctx(pakfire);
+       f->ctx = pakfire_get_ctx(pakfire);
 
        // Store reference to Pakfire
        f->pakfire = pakfire_ref(pakfire);
index dfc2a12c26b97ce1e7d1ee724ea0aa64a9a06a4b..f2e6011b34c9d7a5f3b2a32ee2d4ae632f6de8a1 100644 (file)
@@ -53,7 +53,7 @@ int pakfire_filelist_create(struct pakfire_filelist** list, struct pakfire* pakf
                return -errno;
 
        // Store a reference to the context
-       l->ctx = pakfire_ctx(pakfire);
+       l->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        l->pakfire = pakfire_ref(pakfire);
index fcf402f3be550e1920461520e9bf22103b1c644f..858593f69a932f236e7da119bd14a60d04e39bca 100644 (file)
@@ -213,7 +213,7 @@ int pakfire_jail_create(struct pakfire_jail** jail, struct pakfire* pakfire) {
                return -errno;
 
        // Reference context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Reference Pakfire
        self->pakfire = pakfire_ref(pakfire);
@@ -2259,7 +2259,7 @@ static int pakfire_jail_run_if_possible(struct pakfire* pakfire, const char** ar
        int r;
 
        // Fetch the context
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        r = pakfire_path(pakfire, path, "%s", *argv);
        if (r)
index 68902262eb4ff3a1739da1279946e75354e34671..59cd49f44c3065a39a002a921ed024665315f29c 100644 (file)
@@ -179,7 +179,7 @@ int pakfire_linter_create(struct pakfire_linter** linter,
                return -errno;
 
        // Reference the context
-       l->ctx = pakfire_ctx(pakfire);
+       l->ctx = pakfire_get_ctx(pakfire);
 
        // Reference Pakfire
        l->pakfire = pakfire_ref(pakfire);
index 8985bb4bd5bdeaead01ce143b968b274a1606258..659083bbddeb4cadbd5930be37eddfee262a1876 100644 (file)
@@ -557,7 +557,7 @@ ERROR:
 
 int pakfire_oci_mkimage(struct pakfire* pakfire, FILE* f) {
        struct pakfire_oci_writer writer = {
-               .ctx     = pakfire_ctx(pakfire),
+               .ctx     = pakfire_get_ctx(pakfire),
                .pakfire = pakfire,
        };
        int r;
index 0b9107a129ea8f28ed63e387d2b650c0e6eefe94..7876286493a2649677faca9e13b9009b16576b87 100644 (file)
@@ -177,7 +177,7 @@ int pakfire_package_create_from_solvable(struct pakfire_package** package,
                return -errno;
 
        // Store a reference to the context
-       pkg->ctx = pakfire_ctx(pakfire);
+       pkg->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        pkg->pakfire = pakfire_ref(pakfire);
@@ -222,7 +222,7 @@ int pakfire_package_create(struct pakfire_package** package,
        }
 
        // Fetch the context
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Allocate a new solvable
        Id id = pakfire_repo_add_solvable(repo);
index 65991a3e9b7ab1d832f1c21c6070079e1b692c92..5e9270bad333f16c461be9e8b854cd7463bfc6b7 100644 (file)
@@ -109,7 +109,7 @@ int pakfire_packager_create(struct pakfire_packager** packager,
        p->nrefs = 1;
 
        // Store a reference to the context
-       p->ctx = pakfire_ctx(pakfire);
+       p->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        p->pakfire = pakfire_ref(pakfire);
index 0892213deffe71d8ef033ae6fbe563f2a0b309a9..4c50ce50d3e2b3f3f60ba4c4929f636b1ebdccf7 100644 (file)
@@ -1185,7 +1185,7 @@ struct pakfire* pakfire_unref(struct pakfire* pakfire) {
        return NULL;
 }
 
-struct pakfire_ctx* pakfire_ctx(struct pakfire* pakfire) {
+struct pakfire_ctx* pakfire_get_ctx(struct pakfire* pakfire) {
        return pakfire_ctx_ref(pakfire->ctx);
 }
 
index c15f54f8ef385abc3a890886f80acb774d34abb3..cc1a8848fc488744693f534e6e074f5458be8de8 100644 (file)
@@ -97,7 +97,7 @@ int pakfire_check(struct pakfire* pakfire, struct pakfire_filelist* errors);
 // Snapshots
 int pakfire_update_snapshot(struct pakfire* pakfire);
 
-struct pakfire_ctx* pakfire_ctx(struct pakfire* pakfire);
+struct pakfire_ctx* pakfire_get_ctx(struct pakfire* pakfire);
 
 const char* pakfire_get_effective_arch(struct pakfire* pakfire);
 
index 4677016d0c844b332e18cb5fa2196b86f3e0f2db..0e415590915e9df2a260155647b999c39ff698bc 100644 (file)
@@ -105,7 +105,7 @@ int pakfire_parser_create(struct pakfire_parser** parser,
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        self->pakfire = pakfire_ref(pakfire);
index 8f9c0be2b3e787e0724359e1faaca006ed4edc72..0fb2cf522926cb725e43703530cc5b44ae7937c3 100644 (file)
@@ -424,7 +424,7 @@ int pakfire_parser_parse_data(struct pakfire_parser* parent, const char* data, s
        };
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
 #ifdef ENABLE_DEBUG
        DEBUG(ctx, "Parsing the following data (%zu):\n%.*s\n", len, (int)len, data);
index b4c44d86cb19bcca41b199f76cab549c2195e0a6..39551ec96f1e5a1cd21da1fd7af2a4ec63814706 100644 (file)
@@ -200,7 +200,7 @@ int pakfire_problem_create(struct pakfire_problem** problem,
                return -errno;
 
        // Store a reference to the context
-       p->ctx = pakfire_ctx(pakfire);
+       p->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        p->pakfire = pakfire_ref(pakfire);
index ed58d859bd995333726bf5a4356ec834585c5abf..65afbcf5e83eedb2e952f3f9be4c2050b260beff 100644 (file)
@@ -179,7 +179,7 @@ static int pakfire_getsubid(struct pakfire* pakfire, const char* owner,
        int count;
        int r = -1;
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        r = subid_init(PACKAGE_NAME, stderr);
        if (r) {
@@ -227,7 +227,7 @@ static int pakfire_fgetsubid(struct pakfire* pakfire, struct pakfire_subid* subi
        size_t length = 0;
        char* p = NULL;
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Read the next line
        while (1) {
@@ -308,7 +308,7 @@ static int pakfire_getsubid(struct pakfire* pakfire, const char* path, const cha
        if (!owner)
                return 1;
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        DEBUG(ctx, "Fetching SUBID from %s for %s\n", path, owner);
 
index abf6b94c28d834b5eb163327b57df645891a9c29..3acaf3280e047d46d539fe76efbf05d4dd729a9e 100644 (file)
@@ -1456,7 +1456,7 @@ int pakfire_repo_create(struct pakfire_repo** repo,
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        self->pakfire = pakfire_ref(pakfire);
@@ -1515,7 +1515,7 @@ int pakfire_repo_open(struct pakfire_repo** repo, struct pakfire* pakfire, Repo*
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        self->pakfire = pakfire_ref(pakfire);
@@ -2567,7 +2567,7 @@ int pakfire_repo_compose(struct pakfire* pakfire, const char* path,
        }
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // XXX Check if the key is a secret key
 
index c593306327e17f62c4e7de8c45e7fe4774237829..69568e287eeefa3879efe1174e7f666f0c474c7f 100644 (file)
@@ -206,7 +206,7 @@ int pakfire_snapshot_find(struct pakfire_snapshot** snapshot, struct pakfire* pa
        int fd = -EBADF;
        int r;
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Make the path
        r = pakfire_cache_path(pakfire, path, "%s", "snapshots");
@@ -523,7 +523,7 @@ int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, struct pakfire* pa
                NULL,
        };
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Fetch the configuration
        config = pakfire_get_config(pakfire);
@@ -609,7 +609,7 @@ int pakfire_snapshot_clean(struct pakfire* pakfire) {
        FTS* f = NULL;
        int r;
 
-       struct pakfire_ctx* ctx = pakfire_ctx(pakfire);
+       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        DEBUG(ctx, "Cleaning up snapshots...\n");
 
index 14f6dd654539a1acd43b11e156e9b01d396acdf1..4c62742e2c5128185e8d8f01c94616218a825dee 100644 (file)
@@ -87,7 +87,7 @@ int pakfire_stripper_create(struct pakfire_stripper** stripper,
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_ctx(pakfire);
+       self->ctx = pakfire_get_ctx(pakfire);
 
        // Store a reference to Pakfire
        self->pakfire = pakfire_ref(pakfire);
index 70d259b30fb9e5878dc9c82db72159709aeb7820..7b746bb2e67b9f555ebe218a176d30e1d26548ec 100644 (file)
@@ -376,7 +376,7 @@ int pakfire_transaction_create(struct pakfire_transaction** transaction,
                return -errno;
 
        // Store a reference to the context
-       t->ctx = pakfire_ctx(pakfire);
+       t->ctx = pakfire_get_ctx(pakfire);
 
        // Store reference to Pakfire
        t->pakfire = pakfire_ref(pakfire);