On Thu, Apr 21, 2022 at 10:01 AM Colin Walters <walters(a)verbum.org> wrote:
On Thu, Apr 21, 2022, at 7:19 AM, Zbigniew Jędrzejewski-Szmek wrote:
>
> - dnf-daemon would be dbus-activated and exit-on-idle after a suitable
> timeout
This is how rpm-ostree has worked for about 5 years now:
https://github.com/coreos/rpm-ostree/pull/606
(Lots of useful references in that thread - doing exit-on-idle in a *race free* way with
DBus is unfortunately very tricky. I am still thinking about switching the default client
mode to direct systemd socket activation. As of recently, the client also directly
invokes `systemctl start` (if privileged))
The problem isn't really inherent to a daemon, the problem is the *gigantic* size of
the repodata.
Also on the background in my todo list is to move all the RPM stuff into a forked
subprocess from the daemon that itself is only run on demand - that would mean an idle
daemon still has low memory usage.
I haven't dug into the libdnf5 code, but today it actually embeds the daemon code in
the libdnf repository - I hope we can compile that out or split it out, because rpm-ostree
already has an working DBus API. Maybe in some cases we can try to expose some of the
same API entrypoints, but on the other hand the entire rpm-ostree design is oriented by
default around offline-by-default transactional updates, which is going to look quite
different from an API perspective.
My hope is that the repository gets split out once the libdnf5 API is
finalized. Maintaining it all in one repo is going to be painful for
long-term maintenance.
--
真実はいつも一つ!/ Always, there's only one truth!