I've recently rebuilt my @world disabling wayland use. I can no longer run my qemu VMs with the following error Error starting domain: internal error: process exited while connecting to monitor: /usr/bin/qemu-system-x86_64: symbol lookup error: /usr/bin/qemu-system-x86_64: undefined symbol: gdk_wayland_display_get_type The package qemu didn't appear in @preserved-rebuild. Rebuilding app-emulation/qemu solved the issue. How to trigger this rebuild automatically?
I don't quite agree with the new subject of this bug. My wording was closer to what I observe. Once again - rebuilding qemu after gtk+ was rebuilt with [-wayland] gave me a perfectly working qemu. I've got a similar issue with libreoffice: /usr/lib64/libreoffice/program/soffice.bin: symbol lookup error: /usr/lib64/libreoffice/program/libvclplug_gtk3lo.so: undefined symbol: gdk_wayland_display_get_type So this bug is rather about portage being unable to trigger the rebuild of certain packages that have no wayland use flag, but in fact depend on wayland if their config scripts detects that it exists.
I don't think it's a qemu-specific bug, but a limitation in being able to express rebuild dependency on gtk. Reassigning to x11-libs/gtk+ maintainer for a decision.suggestion. We probably need a form of bug #680496 to make it cleaner. But maybe there is a simpler way to work it around.
Known limitation of PMS, and being tracked elsewhere. Not a QEMU issue.