]> git.ipfire.org Git - pakfire.git/commitdiff
stripper: Directly pass the context
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jun 2025 14:21:39 +0000 (14:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jun 2025 14:21:39 +0000 (14:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/build.c
src/pakfire/stripper.c
src/pakfire/stripper.h

index 28c5d9a6b00bd3887985b972d0882a04ec05b93d..d1090ec6edd2483ce432fcb02a0222d1b0083ab2 100644 (file)
@@ -1730,7 +1730,8 @@ static int pakfire_build_strip(pakfire_build* build) {
        int r;
 
        // Create a new stripper
-       r = pakfire_stripper_create(&stripper, build->root, build->jail, build->buildroot);
+       r = pakfire_stripper_create(&stripper,
+                       build->ctx, build->root, build->jail, build->buildroot);
        if (r < 0)
                goto ERROR;
 
index b1b0c3e4208e310cc9a518486125512623b7b6a0..e9e50b77d6cf5367a2b66ebe7449e10125911026 100644 (file)
@@ -77,7 +77,7 @@ static int pakfire_stripper_open_sources(pakfire_stripper* self) {
 }
 
 int pakfire_stripper_create(pakfire_stripper** stripper,
-               pakfire_root* root, pakfire_jail* jail, const char* path) {
+               pakfire_ctx* ctx, pakfire_root* root, pakfire_jail* jail, const char* path) {
        pakfire_stripper* self = NULL;
        int r;
 
@@ -87,7 +87,7 @@ int pakfire_stripper_create(pakfire_stripper** stripper,
                return -errno;
 
        // Store a reference to the context
-       self->ctx = pakfire_root_get_ctx(root);
+       self->ctx = pakfire_ctx_ref(ctx);
 
        // Store a reference to the root
        self->root = pakfire_root_ref(root);
index 200bd7684b9e91d335d46d37ce6a2dc765464343..e531960f9f7a4dfba6139359e9482f0661d8de84 100644 (file)
 
 typedef struct pakfire_stripper pakfire_stripper;
 
+#include <pakfire/ctx.h>
 #include <pakfire/jail.h>
 #include <pakfire/root.h>
 
 int pakfire_stripper_create(pakfire_stripper** stripper,
-       pakfire_root* root, pakfire_jail* jail, const char* path);
+       pakfire_ctx* ctx, pakfire_root* root, pakfire_jail* jail, const char* path);
 
 pakfire_stripper* pakfire_stripper_ref(pakfire_stripper* self);
 pakfire_stripper* pakfire_stripper_unref(pakfire_stripper* self);