Bug#785231: game-data-packager: update KDE icon cache after "dpkg -i"

Simon McVittie smcv at debian.org
Thu Jun 25 08:54:47 UTC 2015


On Thu, 14 May 2015 at 11:09:17 +0200, Alexandre Detiste wrote:
> I guess the dpkg hook running as root send some dbus message
> to kde running as $user to tell it to refresh it's cache.

No, that is not how D-Bus works. As a general design principle, things
running as "the system" do not send method calls to things in
"the session".

Programs in "the session" can monitor the system bus
for broadcast signals, or bypass D-Bus entirely and use inotify or
similar to watch where the actual data ends up.

> Here is a more general proposal:
> 
> Implement support for /etc/game-data-packager/hooks/,
> that would be shipped empty in the .deb
> (or with a .placeholder like cron ?).

I'm not particularly keen on introducing more hook points for "run some
scripts" if we don't really need to.

> Ideas:
> - symlink lintian there
> - reprepro script
> - custom script that calls debdiff against last known good version

Those are appopriate at "when you have built the .deb"-time...

> - kbuildsycoca4 for the ones too lazy to try to fix their broken DE
>   (well then if 3 packages are generated, the cache is checked 3 times :-| )

... but this is "when you install the .deb", not necessarily
identical. It also has the disadvantage that you noted.

In any case, if KDE needs some arbitrary code execution as root when icons
are updated, it can *already* do that, via dpkg triggers; or if it needs
to execute code as the user, it can inotify on the applications directory.
If it needs this but doesn't have it, that's a bug, which will affect
every .deb (not just ours). Working around this in g-d-p is not the
right solution.

    S



More information about the Pkg-games-devel mailing list