From: Michael Tremer Date: Sun, 29 Jun 2025 14:21:39 +0000 (+0000) Subject: stripper: Directly pass the context X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf34caa6197cd46cc4d1c0123a58a90366211d6f;p=pakfire.git stripper: Directly pass the context Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/build.c b/src/pakfire/build.c index 28c5d9a6..d1090ec6 100644 --- a/src/pakfire/build.c +++ b/src/pakfire/build.c @@ -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; diff --git a/src/pakfire/stripper.c b/src/pakfire/stripper.c index b1b0c3e4..e9e50b77 100644 --- a/src/pakfire/stripper.c +++ b/src/pakfire/stripper.c @@ -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); diff --git a/src/pakfire/stripper.h b/src/pakfire/stripper.h index 200bd768..e531960f 100644 --- a/src/pakfire/stripper.h +++ b/src/pakfire/stripper.h @@ -26,11 +26,12 @@ typedef struct pakfire_stripper pakfire_stripper; +#include #include #include 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);