rpms/kpowersave/F-8 kpowersave-0.7.3-dcop-unmount.patch, NONE, 1.1 kpowersave-0.7.3-pidof.patch, NONE, 1.1 kpowersave.spec, 1.5, 1.6
Dennis Gilmore (ausil)
fedora-extras-commits at redhat.com
Wed Feb 27 14:59:40 UTC 2008
Author: ausil
Update of /cvs/extras/rpms/kpowersave/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv3315
Modified Files:
kpowersave.spec
Added Files:
kpowersave-0.7.3-dcop-unmount.patch
kpowersave-0.7.3-pidof.patch
Log Message:
apply patch to remove warnings when suspending SUsE adds functions to KDE we dont have.
apply patch to hardcode path to pidof
kpowersave-0.7.3-dcop-unmount.patch:
--- NEW FILE kpowersave-0.7.3-dcop-unmount.patch ---
diff -uNr kpowersave-0.7.3-orig/src/kpowersave.cpp kpowersave-0.7.3/src/kpowersave.cpp
--- kpowersave-0.7.3-orig/src/kpowersave.cpp 2007-09-17 12:39:45.000000000 -0500
+++ kpowersave-0.7.3/src/kpowersave.cpp 2008-02-07 10:03:38.000000000 -0600
@@ -683,12 +683,6 @@
if (suspend.suspend2disk) {
if (suspend.suspend2disk_allowed || suspend.suspend2disk_allowed == -1) {
calledSuspend = SUSPEND2DISK;
- if (!handleMounts(true)) {
- kdWarning() << "Could not umount ..." << endl;
- calledSuspend = -1;
- kdDebugFuncOut(trace);
- return false;
- }
if(settings->lockOnSuspend) {
display->lockScreen( settings->lockmethod );
@@ -739,12 +733,6 @@
if (suspend.suspend2ram) {
if (suspend.suspend2ram_allowed || suspend.suspend2ram_allowed == -1) {
calledSuspend = SUSPEND2RAM;
- if (!handleMounts(true)) {
- kdWarning() << "Could not umount ..." << endl;
- calledSuspend = -1;
- kdDebugFuncOut(trace);
- return false;
- }
if(settings->lockOnSuspend) {
display->lockScreen( settings->lockmethod );
@@ -795,12 +783,6 @@
if (suspend.standby) {
if (suspend.standby_allowed || suspend.standby_allowed == -1) {
calledSuspend = STANDBY;
- if (!handleMounts(true)) {
- kdWarning() << "Could not umount ..." << endl;
- calledSuspend = -1;
- kdDebugFuncOut(trace);
- return false;
- }
if(settings->lockOnSuspend) {
display->lockScreen( settings->lockmethod );
@@ -1036,83 +1018,6 @@
kdDebugFuncOut(trace);
}
-/*!
- * Function handle umount/remount external storage media before/after
- * suspend.
- * \param suspend boolean with info if the machine go into suspend or not
- * \return result of the operation
- * \retval true if all was successful
- * \retval false if not
- */
-bool kpowersave::handleMounts( bool suspend ) {
- if (trace) kdDebug() << funcinfo << "IN: " << "called suspend: " << suspend << endl;
-
- bool _ret = false;
- QString _errormsg;
-
- if (settings->unmountExternalOnSuspend) {
- QString _method;
- DCOPRef dcop_ref = DCOPRef( "kded", "mediamanager" );
-
- if (suspend) {
- _method = "unmountAllSuspend()";
- } else {
- _method = "remountAllResume()";
- }
- DCOPReply reply = dcop_ref.call(_method.latin1());
- if ( reply.isValid() ) {
- reply.get(_errormsg);
- if (_errormsg.isEmpty()) {
- kdDebugFuncOut(trace);
- return true;
- } else {
- kdError() << "ERROR while umount/remount partitions: " << _errormsg << endl;
- }
- } else {
- kdWarning() << "Could not umount external storage partitions." << endl;
- }
-
- } else {
- kdDebugFuncOut(trace);
- return true;
- }
-
- // this is only needed for suspend case and an error ...
- // on resume a simple error msg should be enough
- if (!_ret && suspend) {
- // handle error case
- QString _msg;
- QString _e_msg;
- QString _suspend;
-
- if (!_errormsg.isEmpty()) {
- _e_msg = _errormsg;
- } else {
- _e_msg = i18n("Could not call DCOP interface to umount external media.");
- }
-
- // ugly: need qt-tags because mediamanager can return html formated strings !!!
- _msg = "<qt>" +
- i18n("Could not umount external media before suspend/standby. \n "
- "(Reason: %1)\n \n Would you like to continue suspend/standby "
- "anyway? \n(Warning: Continue suspend can cause data loss!)").arg(_e_msg) +
- "</qt>";
-
- _suspend = getSuspendString(calledSuspend);
-
- int answer = KMessageBox::questionYesNo( 0, _msg,
- i18n("Error while prepare %1").arg(_suspend),
- i18n("Suspend anyway"), i18n("Cancel suspend"),
- "ignoreMountOnSuspend");
-
- if (answer == KMessageBox::Yes) {
- _ret = true;
- }
- }
-
- kdDebugFuncOut(trace);
- return _ret;
-}
/*!
* Handle the event for the power button and call the related action.
@@ -2269,13 +2174,6 @@
kdWarning() << "Unknown if we successful resumed, look like a D-Bus timeout since "
<< "elapsed time between suspend and resume is higher than 6 hours" << endl;
- // successful resumed ... remount only in this case
- if (!handleMounts(false)) {
- KPassivePopup::message( i18n("WARNING"),
- i18n("Could not remount (all) external storage"
- " media."), SmallIcon("messagebox_warning", 20),
- this, i18n("Warning"), 15000);
- }
} else {
kdError() << "Unknown error while suspend. Errorcode: " << resume_result << endl;
QString msg;
diff -uNr kpowersave-0.7.3-orig/src/settings.cpp kpowersave-0.7.3/src/settings.cpp
--- kpowersave-0.7.3-orig/src/settings.cpp 2007-09-17 12:39:45.000000000 -0500
+++ kpowersave-0.7.3/src/settings.cpp 2008-02-07 10:03:58.000000000 -0600
@@ -249,7 +249,6 @@
autostartNeverAsk = kconfig->readBoolEntry("AutostartNeverAsk",false);
psMsgAsPassivePopup = kconfig->readBoolEntry("psMsgAsPassivePopup",false);
forceDpmsOffOnLidClose = kconfig->readBoolEntry("forceDpmsOffOnLidClose",false);
- unmountExternalOnSuspend = kconfig->readBoolEntry("unmountExternalOnSuspend",true);
callSetPowerSaveOnAC = kconfig->readBoolEntry("callSetPowerSaveOnAC",true);
lockmethod = kconfig->readEntry("lockMethod", "NULL");
kpowersave-0.7.3-pidof.patch:
--- NEW FILE kpowersave-0.7.3-pidof.patch ---
--- kpowersave-0.7.3-orig/src/inactivity.cpp 2007-09-17 12:39:45.000000000 -0500
+++ kpowersave-0.7.3/src/inactivity.cpp 2008-02-06 20:46:42.000000000 -0600
@@ -286,7 +286,7 @@
}
proc = new KProcess;
- *proc << "pidof" << blacklist;
+ *proc << "/sbin/pidof" << blacklist;
connect( proc, SIGNAL(receivedStdout(KProcess *, char *, int)),this,
SLOT(getPIDs(KProcess *, char *, int)));
Index: kpowersave.spec
===================================================================
RCS file: /cvs/extras/rpms/kpowersave/F-8/kpowersave.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- kpowersave.spec 5 Nov 2007 13:24:10 -0000 1.5
+++ kpowersave.spec 27 Feb 2008 14:59:02 -0000 1.6
@@ -1,6 +1,6 @@
Name: kpowersave
Version: 0.7.3
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: KPowersave is the KDE frontend for powermanagement
Group: Applications/System
@@ -8,6 +8,8 @@
URL: http://powersave.sourceforge.net/
Source0: http://dl.sf.net/powersave/kpowersave-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: kpowersave-0.7.3-pidof.patch
+Patch1: kpowersave-0.7.3-dcop-unmount.patch
BuildRequires: kdelibs-devel
BuildRequires: gettext
@@ -23,6 +25,8 @@
%prep
%setup -q
+%patch0 -p1 -b .pidof
+%patch1 -p1 -b .dcop
# redo auto* foo to get rid of goofy unsermake dep
make -f admin/Makefile.common
@@ -89,6 +93,12 @@
%changelog
+* Wed Feb 06 2008 Dennis Gilmore <dennis at ausil.us> - 0.7.3-3
+- apply patch for bugzilla #245293 #426666
+
+* Sun Dec 09 2007 Rex Dieter <rdieter[AT]fedoraproject.org> - 0.7.3-2
+- BR: kdelibs3-devel
+
* Mon Oct 05 2007 Dennis Gilmore <dennis at ausil.us> - 0.7.3-1
- update to 0.7.3 final
More information about the fedora-extras-commits
mailing list