pull in upstream fix (kde#391782)

cleanup, use %make_build %ldconfig_scriptlets
epel9
Rex Dieter 7 years ago
parent d976aaa86e
commit 53d588195f

17
.gitignore vendored

@ -1,18 +1 @@
/powerdevil-5.9.5.tar.xz
/powerdevil-5.10.0.tar.xz
/powerdevil-5.10.1.tar.xz
/powerdevil-5.10.2.tar.xz
/powerdevil-5.10.3.tar.xz
/powerdevil-5.10.4.tar.xz
/powerdevil-5.10.5.tar.xz
/powerdevil-5.11.1.tar.xz
/powerdevil-5.11.2.tar.xz
/powerdevil-5.11.3.tar.xz
/powerdevil-5.11.4.tar.xz
/powerdevil-5.11.5.tar.xz
/powerdevil-5.11.95.tar.xz
/powerdevil-5.12.0.tar.xz
/powerdevil-5.12.1.tar.xz
/powerdevil-5.12.2.tar.xz
/powerdevil-5.12.3.tar.xz
/powerdevil-5.12.4.tar.xz /powerdevil-5.12.4.tar.xz

@ -0,0 +1,43 @@
From be91abe7fc8cc731b57bec4cf2c004c07b0fd79b Mon Sep 17 00:00:00 2001
From: Kai Uwe Broulik <kde@privat.broulik.de>
Date: Wed, 25 Apr 2018 10:56:16 +0200
Subject: [PATCH] Ignore "migration" key for determining whether the config is
empty
Otherwise we would never generate the default power management configuration
leading to it not suspending on lid close, not handling power buttons etc etc
CHANGELOG: Fixed bug that caused power management system to not work on a fresh install
Reviewed-By: David Edmundson
BUG: 391782
FIXED-IN: 5.12.5
---
daemon/powerdevilcore.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/daemon/powerdevilcore.cpp b/daemon/powerdevilcore.cpp
index 2cf936e..53b7521 100644
--- a/daemon/powerdevilcore.cpp
+++ b/daemon/powerdevilcore.cpp
@@ -108,9 +108,15 @@ void Core::onBackendReady()
m_profilesConfig = KSharedConfig::openConfig("powermanagementprofilesrc", KConfig::CascadeConfig);
+ QStringList groups = m_profilesConfig->groupList();
+ // the "migration" key is for shortcuts migration in added by migratePre512KeyboardShortcuts
+ // and as such our configuration would never be considered empty, ignore it!
+ groups.removeOne(QStringLiteral("migration"));
+
// Is it brand new?
- if (m_profilesConfig->groupList().isEmpty()) {
+ if (groups.isEmpty()) {
// Generate defaults
+ qCDebug(POWERDEVIL) << "Generating a default configuration";
bool toRam = m_backend->supportedSuspendMethods() & PowerDevil::BackendInterface::ToRam;
bool toDisk = m_backend->supportedSuspendMethods() & PowerDevil::BackendInterface::ToDisk;
ProfileGenerator::generateProfiles(toRam, toDisk);
--
2.14.3

@ -3,7 +3,7 @@
Name: powerdevil Name: powerdevil
Version: 5.12.4 Version: 5.12.4
Release: 1%{?dist} Release: 2%{?dist}
Summary: Manages the power consumption settings of a Plasma Shell Summary: Manages the power consumption settings of a Plasma Shell
License: GPLv2+ License: GPLv2+
@ -17,6 +17,9 @@ URL: https://cgit.kde.org/%{name}.git
%endif %endif
Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz Source0: http://download.kde.org/%{stable}/plasma/%{version}/%{name}-%{version}.tar.xz
## upstream patches
Patch1: 0001-Ignore-migration-key-for-determining-whether-the-con.patch
# filter plugin provides # filter plugin provides
%global __provides_exclude_from ^(%{_kf5_qtplugindir}/.*\\.so)$ %global __provides_exclude_from ^(%{_kf5_qtplugindir}/.*\\.so)$
@ -66,19 +69,19 @@ pushd %{_target_platform}
%{cmake_kf5} .. %{cmake_kf5} ..
popd popd
make %{?_smp_mflags} -C %{_target_platform} %make_build -C %{_target_platform}
%install %install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform} make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
%find_lang powerdevil5 --with-html --with-qt --all-name
%find_lang powerdevil5 --with-html --all-name
# Don't bother with -devel # Don't bother with -devel
rm %{buildroot}/%{_libdir}/libpowerdevil{configcommonprivate,core,ui}.so rm %{buildroot}/%{_libdir}/libpowerdevil{configcommonprivate,core,ui}.so
%post -p /sbin/ldconfig %ldconfig_scriptlets
%postun -p /sbin/ldconfig
%files -f powerdevil5.lang %files -f powerdevil5.lang
%license COPYING* %license COPYING*
@ -103,6 +106,10 @@ rm %{buildroot}/%{_libdir}/libpowerdevil{configcommonprivate,core,ui}.so
%changelog %changelog
* Wed Apr 25 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.12.4-2
- pull in upstream fix (kde#391782)
- cleanup, use %%make_build %%ldconfig_scriptlets
* Tue Mar 27 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.12.4-1 * Tue Mar 27 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.12.4-1
- 5.12.4 - 5.12.4

Loading…
Cancel
Save