rdieter pushed to plasma-workspace (f22). "backport fix for update scripts"

notifications at fedoraproject.org notifications at fedoraproject.org
Mon Mar 30 18:07:07 UTC 2015


>From 63abaa40234ca774ff97bee2378bdc7ece7d0ec8 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter at math.unl.edu>
Date: Mon, 30 Mar 2015 13:06:43 -0500
Subject: backport fix for update scripts


diff --git a/fix-update-scripts.patch b/fix-update-scripts.patch
new file mode 100644
index 0000000..f6990b6
--- /dev/null
+++ b/fix-update-scripts.patch
@@ -0,0 +1,32 @@
+diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp
+index 9a916af..c4c60a1 100644
+--- a/shell/scripting/scriptengine.cpp
++++ b/shell/scripting/scriptengine.cpp
+@@ -875,7 +875,7 @@ QStringList ScriptEngine::pendingUpdateScripts(Plasma::Corona *corona)
+     const QString appName = corona->package().metadata().pluginName();
+     QStringList scripts;
+ 
+-    const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, appName + QStringLiteral("/kpartplugins"), QStandardPaths::LocateDirectory);
++    const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "plasma/shells/" + appName + QStringLiteral("/updates"), QStandardPaths::LocateDirectory);
+     Q_FOREACH(const QString& dir, dirs) {
+         QDirIterator it(dir, QStringList() << QStringLiteral("*.js"));
+         while (it.hasNext()) {
+diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
+index 9f190d6..9c9d52c 100644
+--- a/shell/shellcorona.cpp
++++ b/shell/shellcorona.cpp
+@@ -552,7 +552,13 @@ void ShellCorona::processUpdateScripts()
+                 qDebug() << msg;
+             });
+     foreach (const QString &script, WorkspaceScripting::ScriptEngine::pendingUpdateScripts(this)) {
+-        scriptEngine.evaluateScript(script);
++        QFile file(script);
++        if (file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
++            QString code = file.readAll();
++            scriptEngine.evaluateScript(code);
++        } else {
++            qWarning() << "Unable to open the script file" << script << "for reading";
++        }
+     }
+ }
+ 
diff --git a/plasma-workspace.spec b/plasma-workspace.spec
index e0e3794..ac82ceb 100644
--- a/plasma-workspace.spec
+++ b/plasma-workspace.spec
@@ -1,6 +1,6 @@
 Name:           plasma-workspace
 Version:        5.2.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Plasma workspace, applications and applets
 License:        GPLv2+
 URL:            https://projects.kde.org/projects/kde/workspace/plasma-workspace
@@ -26,6 +26,9 @@ Source11:       startkde.cmake
 # http://commits.kde.org/plasma-workspace/24f24e03793c8214a5d1f3414a5aeb48eccef4f4
 Patch4: 0004-Workaround-the-lockscreen-password-field-focus-issue.patch
 
+## master branch Patches
+Patch5: fix-update-scripts.patch
+
 # udev
 BuildRequires:  zlib-devel
 BuildRequires:  dbusmenu-qt5-devel
@@ -274,6 +277,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/{plasma-windowed,org
 
 
 %changelog
+* Mon Mar 30 2015 Rex Dieter <rdieter at fedoraproject.org> 5.2.2-3
+- backport fix for update scripts
+
 * Wed Mar 25 2015 Rex Dieter <rdieter at fedoraproject.org> 5.2.2-2
 - Lockscreen: Password field does not have focus (kde#344823)
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/plasma-workspace.git/commit/?h=f22&id=63abaa40234ca774ff97bee2378bdc7ece7d0ec8


More information about the scm-commits mailing list