From 18db2276126785eaccf63188c8ba04f7239e0c99 Mon Sep 17 00:00:00 2001 From: zhangkun Date: Mon, 17 Aug 2026 10:15:29 +0800 Subject: [PATCH] feat(power): hand service to dde-services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Disable legacy session and system Power module registration. 2. Remove migrated Power assets from dde-daemon packaging. 3. Make dde-services the sole Power1 owner. Log: Transfer Power service ownership from dde-daemon to dde-services. Influence: Upgrades avoid duplicate Power1 ownership. feat(power): 将服务移交 dde-services 1. 禁用 dde-daemon 中旧的会话与系统电源模块注册。 2. 从 dde-daemon 打包中移除已迁移的电源资源。 3. 由 dde-services 单独提供 Power1 服务。 Log: 将电源服务所有权从 dde-daemon 移交至 dde-services。 PMS: TASK-394241 Influence: 升级时避免重复提供 Power1 服务。 --- Makefile | 4 ++++ bin/dde-session-daemon/daemon.go | 1 - bin/dde-session-daemon/module.go | 1 - bin/dde-system-daemon/main.go | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7a7d48bf2..781f4dfe7 100644 --- a/Makefile +++ b/Makefile @@ -171,13 +171,16 @@ install: build install-dde-data install-icons mkdir -pv ${DESTDIR}${PREFIX}/share/dbus-1/system.d cp misc/conf/*.conf ${DESTDIR}${PREFIX}/share/dbus-1/system.d/ + rm -f ${DESTDIR}${PREFIX}/share/dbus-1/system.d/org.deepin.dde.Power1.conf mkdir -pv ${DESTDIR}${PREFIX}/share/dbus-1 cp -r misc/services ${DESTDIR}${PREFIX}/share/dbus-1/ cp -r misc/system-services ${DESTDIR}${PREFIX}/share/dbus-1/ + rm -f ${DESTDIR}${PREFIX}/share/dbus-1/system-services/org.deepin.dde.Power1.service mkdir -pv ${DESTDIR}${PREFIX}/share/polkit-1/actions cp misc/polkit-action/*.policy ${DESTDIR}${PREFIX}/share/polkit-1/actions/ + rm -f ${DESTDIR}${PREFIX}/share/polkit-1/actions/org.deepin.dde.power.policy mkdir -pv ${DESTDIR}${PREFIX}/share/polkit-1/rules.d/ cp misc/polkit-rules/*.rules ${DESTDIR}${PREFIX}/share/polkit-1/rules.d/ @@ -215,6 +218,7 @@ install: build install-dde-data install-icons mkdir -pv ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.daemon/ cp -r misc/dsg-configs/*.json ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.daemon/ + rm -f ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.daemon/org.deepin.dde.daemon.power.json mkdir -pv ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.lightdm-deepin-greeter cp -r misc/dsg-configs/org.deepin.dde.lightdm-deepin-greeter/*.json ${DESTDIR}${PREFIX}/share/dsg/configs/org.deepin.dde.lightdm-deepin-greeter/ diff --git a/bin/dde-session-daemon/daemon.go b/bin/dde-session-daemon/daemon.go index bd5b043b5..57a7b4b74 100644 --- a/bin/dde-session-daemon/daemon.go +++ b/bin/dde-session-daemon/daemon.go @@ -186,7 +186,6 @@ func (s *SessionDaemon) initModules() { "audio", "screensaver", "sessionwatcher", - "power", // need screensaver and sessionwatcher "service-trigger", "clipboard", "inputdevices", diff --git a/bin/dde-session-daemon/module.go b/bin/dde-session-daemon/module.go index 0be7b67a6..0628fd71a 100644 --- a/bin/dde-session-daemon/module.go +++ b/bin/dde-session-daemon/module.go @@ -29,7 +29,6 @@ import ( _ "github.com/linuxdeepin/dde-daemon/screensaver1" _ "github.com/linuxdeepin/dde-daemon/service_trigger" _ "github.com/linuxdeepin/dde-daemon/session/eventlog" - _ "github.com/linuxdeepin/dde-daemon/session/power1" _ "github.com/linuxdeepin/dde-daemon/sessionwatcher1" _ "github.com/linuxdeepin/dde-daemon/systeminfo1" _ "github.com/linuxdeepin/dde-daemon/timedate1" diff --git a/bin/dde-system-daemon/main.go b/bin/dde-system-daemon/main.go index 66976bf60..59eea1d88 100644 --- a/bin/dde-system-daemon/main.go +++ b/bin/dde-system-daemon/main.go @@ -23,7 +23,6 @@ import ( _ "github.com/linuxdeepin/dde-daemon/system/inputdevices1" _ "github.com/linuxdeepin/dde-daemon/system/keyevent1" _ "github.com/linuxdeepin/dde-daemon/system/lang" - _ "github.com/linuxdeepin/dde-daemon/system/power1" _ "github.com/linuxdeepin/dde-daemon/system/resource_ctl" _ "github.com/linuxdeepin/dde-daemon/system/scheduler" _ "github.com/linuxdeepin/dde-daemon/system/swapsched1"