[SCM] KDE Base Workspace module packaging branch, master, updated. debian/4.4.5-3-11-gf1ece5c
Modestas Vainius
modax at alioth.debian.org
Tue Oct 19 22:02:02 UTC 2010
The following commit has been merged in the master branch:
commit e232c3644dda49cfd523a8fa77c6ed4c6855991e
Author: Modestas Vainius <modestas at vainius.eu>
Date: Sun Oct 17 23:10:59 2010 +0300
Properly fix issues with autostart of plasma-netbook.
This deprecates 01_plasma_netbook_no_autostart.diff and add
30_plasma_netbook_fix_autostart.diff patch, which should fully fix problems
with startup of plasma-netbook when plasma-desktop is NOT installed. We aim to
support "plasma-desktop"-less installation via kde-plasma-netbook metapackage
hence this bug was a showstopper for this goal.
---
debian/changelog | 4 +
debian/patches/01_plasma_netbook_no_autostart.diff | 17 --
.../patches/30_plasma_netbook_fix_autostart.diff | 184 ++++++++++++++++++++
debian/patches/series | 2 +-
4 files changed, 189 insertions(+), 18 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index c567d19..40d6c82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,10 @@ kdebase-workspace (4:4.4.5-4~pre1) UNRELEASED; urgency=low
* Fix kdm.postinst not to fail due to -e mode even if default display manager
cannot be found on the system. After all, this behaviour appears to be an
intention of the original code as well. (Closes: #585981)
+ * Deprecate 01_plasma_netbook_no_autostart.diff and add
+ 30_plasma_netbook_fix_autostart.diff patch to properly fix issues
+ with autostart of plasma-netbook. The fix is needed for kde-plasma-netbook
+ metapackage to be useful. (Closes: #584905)
-- Frederik Schwarzer <schwarzerf at gmail.com> Sun, 26 Sep 2010 16:17:42 +0200
diff --git a/debian/patches/01_plasma_netbook_no_autostart.diff b/debian/patches/01_plasma_netbook_no_autostart.diff
deleted file mode 100644
index bab8e18..0000000
--- a/debian/patches/01_plasma_netbook_no_autostart.diff
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/plasma/netbook/shell/plasma-netbook.desktop
-+++ b/plasma/netbook/shell/plasma-netbook.desktop
-@@ -109,4 +109,4 @@
- X-KDE-StartupNotify=false
- OnlyShowIn=KDE;
- X-KDE-autostart-phase=0
--
-+Hidden=true
---- a/plasma/netbook/shell/CMakeLists.txt
-+++ b/plasma/netbook/shell/CMakeLists.txt
-@@ -22,5 +22,5 @@
- install(TARGETS kdeinit_plasma-netbook DESTINATION ${LIB_INSTALL_DIR})
- install(TARGETS plasma-netbook ${INSTALL_TARGETS_DEFAULT_ARGS})
- install(FILES plasma-default-layoutrc DESTINATION ${DATA_INSTALL_DIR}/plasma-netbook/)
--#install(FILES plasma-netbook.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
-+install(FILES plasma-netbook.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
-
diff --git a/debian/patches/30_plasma_netbook_fix_autostart.diff b/debian/patches/30_plasma_netbook_fix_autostart.diff
new file mode 100644
index 0000000..eb8017a
--- /dev/null
+++ b/debian/patches/30_plasma_netbook_fix_autostart.diff
@@ -0,0 +1,184 @@
+From: Modestas Vainius <modax at debian.org>
+Subject: Fix various problems with autostart of plasma-netbook
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584905
+Last-Update: 2010-10-17
+
+This patch should fully fix problems with startup of plasma-netbook when
+plasma-desktop is NOT installed. We aim to support "plasma-desktop"-less
+installation via kde-plasma-netbook metapackage hence this bug was a
+showstopper for this goal.
+--- a/plasma/netbook/shell/plasma-netbook.desktop
++++ b/plasma/netbook/shell/plasma-netbook.desktop
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Exec=plasma-netbook --desktop
++Exec=plasma-netbook --autostart
+ X-DBUS-StartupType=wait
+ Name=Plasma Netbook
+ Name[ca]=Plasma Netbook
+--- a/plasma/netbook/shell/CMakeLists.txt
++++ b/plasma/netbook/shell/CMakeLists.txt
+@@ -22,5 +22,5 @@ endif(X11_Xrender_FOUND)
+ install(TARGETS kdeinit_plasma-netbook DESTINATION ${LIB_INSTALL_DIR})
+ install(TARGETS plasma-netbook ${INSTALL_TARGETS_DEFAULT_ARGS})
+ install(FILES plasma-default-layoutrc DESTINATION ${DATA_INSTALL_DIR}/plasma-netbook/)
+-#install(FILES plasma-netbook.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
++install(FILES plasma-netbook.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})
+
+--- a/kcontrol/workspaceoptions/workspaceoptions.cpp
++++ b/kcontrol/workspaceoptions/workspaceoptions.cpp
+@@ -89,7 +89,7 @@ void WorkspaceOptionsModule::save()
+
+ m_plasmaNetbookAutostart.setAutostarts(!isDesktop);
+ m_plasmaNetbookAutostart.setStartPhase(KAutostart::BaseDesktop);
+- m_plasmaNetbookAutostart.setCommand("plasma-netbook");
++ m_plasmaNetbookAutostart.setCommand("plasma-netbook --autostart");
+ m_plasmaNetbookAutostart.setAllowedEnvironments(QStringList()<<"KDE");
+
+ KConfigGroup winCg(m_kwinConfig, "Windows");
+--- a/plasma/netbook/shell/main.cpp
++++ b/plasma/netbook/shell/main.cpp
+@@ -58,9 +58,13 @@ KDE_EXPORT int kdemain(int argc, char **
+ KCmdLineOptions options;
+ options.add("nodesktop", ki18n("Starts as a normal application instead of as the primary user interface"));
+ options.add("screen <geometry>", ki18n("The geometry of the screen"), "800x480");
++ options.add("autostart", ki18n("Take into account autostart settings before starting"));
+ KCmdLineArgs::addCmdLineOptions(options);
+
+ PlasmaApp *app = PlasmaApp::self();
++ if (!app->shallBeStarted())
++ return 0;
++
+ QApplication::setWindowIcon(KIcon("plasma"));
+ app->disableSessionManagement(); // autostarted
+ int rc = app->exec();
+--- a/plasma/netbook/shell/plasmaapp.cpp
++++ b/plasma/netbook/shell/plasmaapp.cpp
+@@ -34,6 +34,7 @@
+ #include <KCmdLineArgs>
+ #include <KStandardAction>
+ #include <KWindowSystem>
++#include <KAutostart>
+
+ #include <ksmserver_interface.h>
+
+@@ -216,13 +217,21 @@ PlasmaApp::PlasmaApp()
+ m_isDesktop(false),
+ m_autoHideControlBar(true),
+ m_raiseTimer(new QTimer(this)),
+- m_unHideTimer(0)
++ m_unHideTimer(0),
++ m_shallBeStarted(true)
+ {
+ KGlobal::locale()->insertCatalog("libplasma");
+ KGlobal::locale()->insertCatalog("plasmagenericshell");
+
+
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
++
++ if (args->isSet("autostart")) {
++ setupAutostart();
++ if (!shallBeStarted())
++ return;
++ }
++
+ bool isDesktop = args->isSet("desktop");
+ if (isDesktop) {
+ notifyStartup(false);
+@@ -296,6 +305,38 @@ PlasmaApp::~PlasmaApp()
+ {
+ }
+
++void PlasmaApp::setupAutostart()
++{
++ // If autostart service is not registered, do not bother setting
++ // autostart up.
++ if (!KAutostart::isServiceRegistered("plasma-netbook"))
++ return;
++
++ if (KAutostart::isServiceRegistered("plasma-desktop")) {
++ // Both plasma-desktop and plasma-netbook are installed, but
++ // plasma-desktop is preferred. Change plasma-netbook autostart
++ // settings according to plasma-desktop status.
++ m_shallBeStarted = !KAutostart("plasma-desktop").autostarts();
++ } else {
++ // If plasma-desktop is not installed, make sure autostart
++ // is enabled
++ m_shallBeStarted = true;
++ }
++
++ KAutostart netbookAutostart("plasma-netbook");
++ if (netbookAutostart.autostarts() != m_shallBeStarted) {
++ netbookAutostart.setAutostarts(m_shallBeStarted);
++ netbookAutostart.setStartPhase(KAutostart::BaseDesktop);
++ netbookAutostart.setCommand("plasma-netbook --autostart");
++ netbookAutostart.setAllowedEnvironments(QStringList()<<"KDE");
++ }
++}
++
++bool PlasmaApp::shallBeStarted()
++{
++ return m_shallBeStarted;
++}
++
+ void PlasmaApp::cleanup()
+ {
+ if (m_corona) {
+--- a/plasma/netbook/shell/plasmaapp.h
++++ b/plasma/netbook/shell/plasmaapp.h
+@@ -84,6 +84,12 @@ public:
+ */
+ bool isDesktop() const;
+
++ /**
++ * Returns false if plasma-netbook should not be started
++ * (e.g. due to enabled autostart of plasma-desktop)
++ */
++ bool shallBeStarted();
++
+ void showWidgetExplorer(Plasma::Containment *containment);
+
+ public Q_SLOTS:
+@@ -99,6 +105,7 @@ private:
+ void reserveStruts();
+ void createUnhideTrigger();
+ void destroyUnHideTrigger();
++ void setupAutostart();
+
+ private Q_SLOTS:
+ void cleanup();
+@@ -140,6 +147,7 @@ private:
+ bool m_autoHideControlBar;
+ QTimer *m_unHideTimer;
+ QTimer *m_raiseTimer;
++ bool m_shallBeStarted;
+ };
+
+ #endif // multiple inclusion guard
+--- a/startkde.cmake
++++ b/startkde.cmake
+@@ -356,6 +356,24 @@ else
+ exit 1
+ fi
+
++# Added by Debian to fix bug #584905.
++# Reset user plasma-desktop/plasma-netbook autostart configuration if autostart
++# desktop file is not available system-wide for either of the shells. This
++# ensures that a user does not end up without any autostarted plasma shell when
++# a package of the active shell gets removed.
++if [ ! -e "@AUTOSTART_INSTALL_DIR@/plasma-desktop.desktop" ] && \
++ [ -e "@AUTOSTART_INSTALL_DIR@/plasma-netbook.desktop" ];
++then
++ # Reset custom plasma-netbook configuration
++ user_autostart_dir=`kde4-config --path autostart | cut -d: -f1`
++ rm -f "$user_autostart_dir/plasma-netbook.desktop"
++elif [ -e "@AUTOSTART_INSTALL_DIR@/plasma-desktop.desktop" ] && \
++ [ ! -e "@AUTOSTART_INSTALL_DIR@/plasma-netbook.desktop" ];
++then
++ # Reset custom plasma-desktop configuration
++ user_autostart_dir=`kde4-config --path autostart | cut -d: -f1`
++ rm -f "$user_autostart_dir/plasma-desktop.desktop"
++fi
+
+ # Mark that full KDE session is running (e.g. Konqueror preloading works only
+ # with full KDE running). The KDE_FULL_SESSION property can be detected by
diff --git a/debian/patches/series b/debian/patches/series
index 4e0e7f5..dc8f1aa 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
-01_plasma_netbook_no_autostart.diff
02_kdm_double_servertimeout.diff
06_kdm_does_not_wreak_havoc.diff
07_kdmrc_defaults.diff
@@ -14,6 +13,7 @@
26_run_kaboom_when_starting_kde.diff
28_backport_bug156475_dualhead_support.diff
29_backport_fix_krandr_support_in_startkde.diff
+30_plasma_netbook_fix_autostart.diff
97_fix_target_link_libraries.diff
27_ld_exclude_libs_qtuitools.diff
99_solid_network_use_ntrack.diff
--
KDE Base Workspace module packaging
More information about the pkg-kde-commits
mailing list