Daemon may take some moments to do IO operations, and the tests
may be too fast in reading this.
As per previous cleanups this become a problem when testing in
slower scenarios (as valgrind), so take the opportunity to
cleanup the tests so that we always wait for file contents to
match the expected one.
Some clients (notably GNOME) look specifically for both the path and
interface. To avoid breaking them on profile change events make sure
to emit signals on both the legacy and modern interface.
Some systems have multiple GPUs with an eDP output but the panel
isn't connected to all of them (or it's controlled by a mux).
Handle this case by ensuring that the panel is connected when
before writing an attribute.
Expose the daemon as 'org.freedesktop.UPower.PowerProfiles' by default
but we also own the old 'net.hadess.PowerProfiles' name for
compatibility resons.
Also dbus objects are now registered also in the path
/org/freedesktop/UPower/PowerProfiles and they implement the
org.freedesktop.UPower.PowerProfiles interface.
Even in this case we preserve the compatibility with the old ones.
To make this switch as most reliable as possible, the code is now
generated for dbus configuration files preserving the previous ones as
base.
Tests are now performed checking both names, to ensure again that we're
not breaking the expectations for the old APIs consumers.
It's still quite old, but provides some features we may want to use in
future, so let's use a newer version since we're about to release a new
major version of p-p-d too.
Some distros as LTS ones may still have old versions of polkit
gobject.
Since we only depend on the new polkit because of auto-pointers,
let's add a tiny compatibility layer to make possible to get
p-p-d also working on older stable distros as OEMs may like.
Remove a lot of the unnecessary stuff about the process, and instead
pad out the domain to make it more accessible.
If running on an interactive terminal add color coding for warnings
and errors. If this behavior is not desirable for an interactive terminal,
NO_COLOR=0 can be set in the environment.
Running Tests.test_fake_driver breaks stdin on a real terminal unless
the test suite is run as root. It doesn't make sense for the fake
driver to capture stdin unless we are sure that we're interactive.
Lookup whether stdout is a tty and only run the keyboard setup in
probe for the fake driver if we're sure we're interactive.