Skip to content

Commit

Permalink
power_profiles_daemon: Move to org.freedesktop.UPower.PowerProfiles
Browse files Browse the repository at this point in the history
Version 0.20 moved to D-Bus name `org.freedesktop.UPower.PowerProfiles`,
and corresponding changes to the object path/interface:
https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/releases/0.20

The real daemon also still listens to the old name, but we can't do that
in dbusmock: BUS_NAME and friends cannot be parameterized, as their
loading and instantiation happens before calling the `load()` function.

`powerprofilesctl` now only looks at the new name, so we need to adjust
the template. The new version is in Fedora 39 to rawhide and also in
Debian testing, so for ongoing development it's more useful to present
the current API.
  • Loading branch information
martinpitt committed Feb 23, 2024
1 parent 1133c22 commit 8cec9a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dbusmock/templates/power_profiles_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
__author__ = "Bastien Nocera"
__copyright__ = """
(c) 2021, Red Hat Inc.
(c) 2017 - 2022 Martin Pitt <[email protected]>
(c) 2017 - 2024 Martin Pitt <[email protected]>
"""

import dbus

BUS_NAME = "net.hadess.PowerProfiles"
MAIN_OBJ = "/net/hadess/PowerProfiles"
MAIN_IFACE = "net.hadess.PowerProfiles"
BUS_NAME = "org.freedesktop.UPower.PowerProfiles"
MAIN_OBJ = "/org/freedesktop/UPower/PowerProfiles"
MAIN_IFACE = "org.freedesktop.UPower.PowerProfiles"
SYSTEM_BUS = True


Expand Down

0 comments on commit 8cec9a1

Please sign in to comment.