On Fri, 27 Jun 2025 at 04:19:40 +0200, Santiago Vila wrote:
I'm Cc:ing Simon McVittie who fixed a similar bug not a long time ago,
maybe he can explain better than me.
Are you referring to #1102099 in game-data-packager?
That was a rather different situation, where running Inkscape without
access to a D-Bus session bus caused it to log warnings, but running it
with access to an empty session bus (but without typical desktop session
services) crashed out with an uncaught Gio::DBus::Error exception. I
think that was really a bug in Inkscape: instead of crashing out with an
uncaught exception when a non-fatal error occurred, it should have
caught the exception and handled it appropriately (most likely by
logging a warning or an informational message and continuing). We were
able to work around the Inkscape bug by setting environment variables
such as GIO_USE_VFS=local to suppress use of features that require D-Bus
services, which are attempted by default but happen to be unnecessary
for game-data-packager's batch-processing use-case.
Please don't treat this as precedent for "remove dbus-run-session from
the command-line" being a good first thing to try whenever there is a
build or build-time-test failure. If a test suite or a piece of
build-time batch processing is wrapped in dbus-run-session, it's usually
there for a reason.
If my theory about this particular FTBFS is correct, removing the use of
dbus-run-session results in the build using D-Bus X11 autolaunching
(dbus-launch, dbus-x11) instead, which works around the test failure via
an internal implementation detail of dbus-launch (the fact that it's an
X11 client); and if that theory is correct, `xeyes &` would have been an
almost equivalent workaround (I say "almost" because it would have a
race condition), but the real solution would be to use
`xvfb-run -s "-noreset"` to suppress the X server's unwanted "reset"
behaviour.
If a test suite needs a D-Bus session bus, which many do, then
dbus-run-session is a more appropriate tool to achieve that than
dbus-launch.
smcv