Am Di, 11 Jun 2024 13:22:29 +0100
schrieb Simon McVittie <s...@debian.org>:

> On Tue, 11 Jun 2024 at 13:28:52 +0200, Chris Hofstaedtler wrote:
> > Maybe smcv can chime in here.
>
> [...]
> > I think there is a better way than running a
> > postinst script in each individual package (triggers?).
>
> Yes, there is a better way, and it is triggers.
>
> libgdk-pixbuf-2.0-0 registers a trigger on
> /usr/lib/MULTIARCH/gdk-pixbuf-2.0/2.10.0/loaders which should result
> in it automatically running
> /usr/lib/MULTIARCH/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
> every time a package that provides a gdk-pixbuf loader is installed,
> removed or updated.
>
> As a result, a jpeg-xl loader for gdk-pixbuf should not need to do
> anything special in its postinst at all: it should install a loader
> that matches the naming convention set by gdk-pixbuf, and that should
> be enough for the gdk-pixbuf packaging to handle the rest. If the
> trigger is not sufficient, please report a bug with
> steps-to-reproduce.
>
> The naming convention is ${gdk_pixbuf_moduledir}/*.so, where
> ${gdk_pixbuf_moduledir} should be discovered at build-time from
> the gdk-pixbuf-2.0 pkgconf module. Hopefully the upstream build system
> already does this correctly.
>
> heif-gdk-pixbuf from src:libheif, librsvg2-common from src:rsvg, and
> webp-pixbuf-loader from src:webp-pixbuf-loader might be good examples
> of a working gdk-pixbuf loader.
>
> heif-gdk-pixbuf and webp-pixbuf-loader do not seem to have any
> hand-written code in their postinsts at all, so they completely rely
> on gdk-pixbuf's triggers, and that seems to work fine in practice.

Thank you for the explanation. Then the postinst/postrm scripts can be
dropped, since the trigger triggers.


Cheers,
Julian

--
 ()  ascii ribbon campaign - against html e-mail
 /\                        - against proprietary attachments

Reply via email to