rev 13684 - in branches/kde4.2/packages/kdelibs/debian: . patches
Sune Vuorela
pusling-guest at alioth.debian.org
Sat Jan 31 07:34:23 UTC 2009
Author: pusling-guest
Date: 2009-01-31 07:34:23 +0000 (Sat, 31 Jan 2009)
New Revision: 13684
Added:
branches/kde4.2/packages/kdelibs/debian/patches/01_r917170_kio_update_on_break.diff
branches/kde4.2/packages/kdelibs/debian/patches/01_r918403_klauncher_hang.diff
branches/kde4.2/packages/kdelibs/debian/patches/01_r918654_klauncher_unique_app.diff
branches/kde4.2/packages/kdelibs/debian/patches/01_r918838_kded_desktop_file_watch.diff
Modified:
branches/kde4.2/packages/kdelibs/debian/changelog
branches/kde4.2/packages/kdelibs/debian/patches/series
Log:
+++ Changes by Sune Vuorela:
* Add patches from upstream for some stability fixed:
01_r917170_kio_update_on_break.diff
01_r918403_klauncher_hang.diff
01_r918654_klauncher_unique_app.diff
01_r918838_kded_desktop_file_watch.diff
Thanks to David Faure for pushing them.
Modified: branches/kde4.2/packages/kdelibs/debian/changelog
===================================================================
--- branches/kde4.2/packages/kdelibs/debian/changelog 2009-01-31 06:57:37 UTC (rev 13683)
+++ branches/kde4.2/packages/kdelibs/debian/changelog 2009-01-31 07:34:23 UTC (rev 13684)
@@ -1,4 +1,4 @@
-kde4libs (4:4.2.0-3) UNRELEASED; urgency=low
+kde4libs (4:4.2.0-3) experimental; urgency=low
+++ Changes by Armin Berres:
@@ -11,6 +11,15 @@
* Update debian/libplasma3.symbols.in with {qreal} substitutions. Fixes
FTBFS on arm(el).
+ +++ Changes by Sune Vuorela:
+
+ * Add patches from upstream for some stability fixed:
+ 01_r917170_kio_update_on_break.diff
+ 01_r918403_klauncher_hang.diff
+ 01_r918654_klauncher_unique_app.diff
+ 01_r918838_kded_desktop_file_watch.diff
+ Thanks to David Faure for pushing them.
+
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Thu, 29 Jan 2009 22:20:37 +0200
kde4libs (4:4.2.0-2) experimental; urgency=low
Added: branches/kde4.2/packages/kdelibs/debian/patches/01_r917170_kio_update_on_break.diff
===================================================================
--- branches/kde4.2/packages/kdelibs/debian/patches/01_r917170_kio_update_on_break.diff (rev 0)
+++ branches/kde4.2/packages/kdelibs/debian/patches/01_r917170_kio_update_on_break.diff 2009-01-31 07:34:23 UTC (rev 13684)
@@ -0,0 +1,131 @@
+http://bugs.kde.org/118593
+Index: kdelibs/kio/kio/copyjob.h
+===================================================================
+--- kdelibs/kio/kio/copyjob.h (revision 917169)
++++ kdelibs/kio/kio/copyjob.h (revision 917170)
+@@ -245,6 +245,7 @@
+
+ protected:
+ CopyJob(CopyJobPrivate &dd);
++ void emitResult();
+
+ private:
+ Q_PRIVATE_SLOT(d_func(), void slotStart())
+Index: kdelibs/kio/kio/copyjob.cpp
+===================================================================
+--- kdelibs/kio/kio/copyjob.cpp (revision 917169)
++++ kdelibs/kio/kio/copyjob.cpp (revision 917170)
+@@ -153,7 +153,7 @@
+ QList<CopyInfo> dirs;
+ KUrl::List dirsToRemove;
+ KUrl::List m_srcList;
+- KUrl::List m_skippedSourceUrls;
++ KUrl::List m_successSrcList;
+ KUrl::List::const_iterator m_currentStatSrc;
+ bool m_bCurrentSrcIsDir;
+ bool m_bCurrentOperationIsLink;
+@@ -770,10 +770,6 @@
+
+ void CopyJobPrivate::skip( const KUrl & sourceUrl )
+ {
+- // If this is one if toplevel sources,
+- // remove it from d->m_srcList, for a correct FilesRemoved() signal
+- // But don't do it right away, we have iterators into that list (#157601)
+- m_skippedSourceUrls.append( sourceUrl );
+ dirsToRemove.removeAll( sourceUrl );
+ }
+
+@@ -857,6 +853,7 @@
+ {
+ //this is required for the undo feature
+ emit q->copyingDone( q, (*it).uSource, (*it).uDest, (*it).mtime, true, false );
++ m_successSrcList.append((*it).uSource);
+ m_directoriesCopied.append( *it );
+ dirs.erase( it );
+ }
+@@ -1118,6 +1115,7 @@
+ emit q->copyingDone( q, (*it).uSource, (*it).uDest, (*it).mtime, false, false );
+ if (m_mode == CopyJob::Move)
+ org::kde::KDirNotify::emitFileMoved( (*it).uSource.url(), (*it).uDest.url() );
++ m_successSrcList.append((*it).uSource);
+ }
+ // remove from list, to move on to next file
+ files.erase( it );
+@@ -1372,7 +1370,7 @@
+ KIO::Job * newjob = 0;
+ if ( m_mode == CopyJob::Link ) {
+ // User requested that a symlink be made
+- JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
++ const JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
+ newjob = linkNextFile(uSource, uDest, flags);
+ if (!newjob)
+ return;
+@@ -1384,7 +1382,7 @@
+ (uSource.pass() == uDest.pass()))
+ // Copying a symlink - only on the same protocol/host/etc. (#5601, downloading an FTP file through its link),
+ {
+- JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
++ const JobFlags flags = bOverwrite ? Overwrite : DefaultFlags;
+ KIO::SimpleJob *newJob = KIO::symlink( (*it).linkDest, uDest, flags | HideProgressInfo /*no GUI*/ );
+ Scheduler::scheduleJob(newJob);
+ newjob = newJob;
+@@ -1509,23 +1507,6 @@
+ // but then we need to jump to the else part below. Maybe with a recursive call?
+ #endif
+ } else {
+- // Finished - tell the world
+- if ( !m_bOnlyRenames )
+- {
+- KUrl url( m_globalDest );
+- if ( m_globalDestinationState != DEST_IS_DIR || m_asMethod )
+- url.setPath( url.directory() );
+- //kDebug(7007) << "KDirNotify'ing FilesAdded " << url;
+- org::kde::KDirNotify::emitFilesAdded( url.url() );
+-
+- Q_FOREACH(const KUrl& url, m_skippedSourceUrls)
+- m_srcList.removeAll(url);
+-
+- if ( m_mode == CopyJob::Move && !m_srcList.isEmpty() ) {
+- //kDebug(7007) << "KDirNotify'ing FilesRemoved " << m_srcList.toStringList();
+- org::kde::KDirNotify::emitFilesRemoved( m_srcList.toStringList() );
+- }
+- }
+ if (m_reportTimer)
+ m_reportTimer->stop();
+ --m_processedFiles; // undo the "start at 1" hack
+@@ -1535,6 +1516,27 @@
+ }
+ }
+
++void CopyJob::emitResult()
++{
++ Q_D(CopyJob);
++ // Before we go, tell the world about the changes that were made.
++ // Even if some error made us abort midway, we might still have done
++ // part of the job so we better update the views! (#118583)
++ if (!d->m_bOnlyRenames) {
++ KUrl url(d->m_globalDest);
++ if (d->m_globalDestinationState != DEST_IS_DIR || d->m_asMethod)
++ url.setPath(url.directory());
++ //kDebug(7007) << "KDirNotify'ing FilesAdded " << url;
++ org::kde::KDirNotify::emitFilesAdded( url.url() );
++
++ if (d->m_mode == CopyJob::Move && !d->m_successSrcList.isEmpty()) {
++ kDebug(7007) << "KDirNotify'ing FilesRemoved" << d->m_successSrcList.toStringList();
++ org::kde::KDirNotify::emitFilesRemoved(d->m_successSrcList.toStringList());
++ }
++ }
++ Job::emitResult();
++}
++
+ void CopyJobPrivate::slotProcessedSize( KJob*, qulonglong data_size )
+ {
+ Q_Q(CopyJob);
+@@ -1801,6 +1803,7 @@
+ kDebug(7007) << "Renaming succeeded, move on";
+ ++m_processedFiles;
+ emit q->copyingDone( q, *m_currentStatSrc, dest, -1 /*mtime unknown, and not needed*/, true, true );
++ m_successSrcList.append(*m_currentStatSrc);
+ statNextSrc();
+ }
+ }
Added: branches/kde4.2/packages/kdelibs/debian/patches/01_r918403_klauncher_hang.diff
===================================================================
--- branches/kde4.2/packages/kdelibs/debian/patches/01_r918403_klauncher_hang.diff (rev 0)
+++ branches/kde4.2/packages/kdelibs/debian/patches/01_r918403_klauncher_hang.diff 2009-01-31 07:34:23 UTC (rev 13684)
@@ -0,0 +1,87 @@
+Index: kdelibs/kinit/klauncher.cpp
+===================================================================
+--- kdelibs/kinit/klauncher.cpp (revision 918402)
++++ kdelibs/kinit/klauncher.cpp (revision 918403)
+@@ -167,7 +167,7 @@
+
+ KLauncher::KLauncher(int _kdeinitSocket)
+ : QObject(0),
+- kdeinitSocket(_kdeinitSocket), dontBlockReading(false)
++ kdeinitSocket(_kdeinitSocket)
+ {
+ #ifdef Q_WS_X11
+ mCached_dpy = NULL;
+@@ -276,8 +276,24 @@
+ {
+ ssize_t result;
+ int bytes_left = len;
+- while ( bytes_left > 0)
+- {
++ while (bytes_left > 0) {
++ // in case we get a request to start an application and data arrive
++ // to kdeinitSocket at the same time, requestStart() will already
++ // call slotKDEInitData(), so we must check there's still something
++ // to read, otherwise this would block
++
++ // Same thing if kdeinit dies without warning.
++
++ fd_set in;
++ timeval tm = { 30, 0 }; // 30 seconds timeout, so we're not stuck in case kdeinit dies on us
++ FD_ZERO ( &in );
++ FD_SET( sock, &in );
++ select( sock + 1, &in, 0, 0, &tm );
++ if( !FD_ISSET( sock, &in )) {
++ kDebug(7016) << "read_socket" << sock << "nothing to read, kdeinit4 must be dead";
++ return -1;
++ }
++
+ result = read(sock, buffer, bytes_left);
+ if (result > 0)
+ {
+@@ -298,21 +314,7 @@
+ {
+ klauncher_header request_header;
+ QByteArray requestData;
+- if( dontBlockReading )
+- {
+- // in case we get a request to start an application and data arrive
+- // to kdeinitSocket at the same time, requestStart() will already
+- // call slotKDEInitData(), so we must check there's still something
+- // to read, otherwise this would block
+- fd_set in;
+- timeval tm = { 0, 0 };
+- FD_ZERO ( &in );
+- FD_SET( kdeinitSocket, &in );
+- select( kdeinitSocket + 1, &in, 0, 0, &tm );
+- if( !FD_ISSET( kdeinitSocket, &in ))
+- return;
+- }
+- dontBlockReading = false;
++
+ int result = read_socket(kdeinitSocket, (char *) &request_header,
+ sizeof( request_header));
+ if (result == -1)
+@@ -647,17 +649,21 @@
+ request_header.cmd = LAUNCHER_EXEC_NEW;
+ #endif
+ request_header.arg_length = requestData.length();
++
++#ifdef KLAUNCHER_VERBOSE_OUTPUT
++ kDebug(7016) << "Asking kdeinit to start" << request->name << request->arg_list
++ << "cmd=" << commandToString(request_header.cmd);
++#endif
++
+ write(kdeinitSocket, &request_header, sizeof(request_header));
+ write(kdeinitSocket, requestData.data(), requestData.length());
+
+ // Wait for pid to return.
+ lastRequest = request;
+- dontBlockReading = false;
+ do {
+ slotKDEInitData( kdeinitSocket );
+ }
+ while (lastRequest != 0);
+- dontBlockReading = true;
+ #endif
+ }
+
Added: branches/kde4.2/packages/kdelibs/debian/patches/01_r918654_klauncher_unique_app.diff
===================================================================
--- branches/kde4.2/packages/kdelibs/debian/patches/01_r918654_klauncher_unique_app.diff (rev 0)
+++ branches/kde4.2/packages/kdelibs/debian/patches/01_r918654_klauncher_unique_app.diff 2009-01-31 07:34:23 UTC (rev 13684)
@@ -0,0 +1,130 @@
+http://bugs.kde.org/162729
+Index: kdelibs/kinit/klauncher.cpp
+===================================================================
+--- kdelibs/kinit/klauncher.cpp (revision 918653)
++++ kdelibs/kinit/klauncher.cpp (revision 918654)
+@@ -58,6 +58,9 @@
+
+ // #define KLAUNCHER_VERBOSE_OUTPUT
+
++static const char* const s_DBusStartupTypeToString[] =
++ { "DBusNone", "DBusUnique", "DBusMulti", "DBusWait", "ERROR" };
++
+ using namespace KIO;
+
+ IdleSlave::IdleSlave(QObject *parent)
+@@ -393,15 +396,19 @@
+ if (request->pid == pid)
+ {
+ if (request->dbus_startup_type == KService::DBusWait)
+- request->status = KLaunchRequest::Done;
++ request->status = KLaunchRequest::Done;
+ else if ((request->dbus_startup_type == KService::DBusUnique)
+- && QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name))
+- request->status = KLaunchRequest::Running;
+- else
+- request->status = KLaunchRequest::Error;
++ && QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name)) {
++ request->status = KLaunchRequest::Running;
+ #ifdef KLAUNCHER_VERBOSE_OUTPUT
+- kDebug(7016) << pid << "died, requestDone. status=" << request->status;
++ kDebug(7016) << pid << "running as a unique app";
+ #endif
++ } else {
++ request->status = KLaunchRequest::Error;
++#ifdef KLAUNCHER_VERBOSE_OUTPUT
++ kDebug(7016) << pid << "died, requestDone. status=" << request->status;
++#endif
++ }
+ requestDone(request);
+ return;
+ }
+@@ -446,19 +453,29 @@
+ if (request->status != KLaunchRequest::Launching)
+ continue;
+
++#ifdef KLAUNCHER_VERBOSE_OUTPUT
++ kDebug(7016) << "had pending request" << request->name << s_DBusStartupTypeToString[request->dbus_startup_type] << "dbus_name" << request->dbus_name << request->tolerant_dbus_name;
++#endif
+ // For unique services check the requested service name first
+- if ((request->dbus_startup_type == KService::DBusUnique) &&
+- ((appId == request->dbus_name) ||
+- QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name)))
+- {
+- request->status = KLaunchRequest::Running;
+- requestDone(request);
+- continue;
++ if (request->dbus_startup_type == KService::DBusUnique) {
++ if ((appId == request->dbus_name) || // just started
++ QDBusConnection::sessionBus().interface()->isServiceRegistered(request->dbus_name)) { // was already running
++ request->status = KLaunchRequest::Running;
++#ifdef KLAUNCHER_VERBOSE_OUTPUT
++ kDebug(7016) << "OK, unique app" << request->dbus_name << "is running";
++#endif
++ requestDone(request);
++ continue;
++ } else {
++#ifdef KLAUNCHER_VERBOSE_OUTPUT
++ kDebug(7016) << "unique app" << request->dbus_name << "not running yet";
++#endif
++ }
+ }
+
+- const QString rAppId = request->dbus_name;
++ const QString rAppId = !request->tolerant_dbus_name.isEmpty() ? request->tolerant_dbus_name : request->dbus_name;
+ #ifdef KLAUNCHER_VERBOSE_OUTPUT
+- kDebug(7016) << "had pending request" << rAppId;
++ //kDebug(7016) << "using" << rAppId << "for matching";
+ #endif
+ if (rAppId.isEmpty())
+ continue;
+@@ -818,11 +835,18 @@
+ request->dbus_name = v.toString().toUtf8();
+ }
+ if (request->dbus_name.isEmpty()) {
+- request->dbus_name = "*." + QFile::encodeName(KRun::binaryName(service->exec(), true));
++ const QString binName = KRun::binaryName(service->exec(), true);
++ request->dbus_name = "org.kde." + binName;
++ request->tolerant_dbus_name = "*." + binName;
+ }
+ }
+ }
+
++#ifdef KLAUNCHER_VERBOSE_OUTPUT
++ kDebug(7016) << "name=" << request->name << "dbus_name=" << request->dbus_name
++ << "startup type=" << s_DBusStartupTypeToString[request->dbus_startup_type];
++#endif
++
+ request->pid = 0;
+ request->envs = envs;
+ send_service_startup_info( request, service, startup_id, envs );
+@@ -938,7 +962,7 @@
+ request->arg_list.append(arg.toLocal8Bit());
+ }
+
+- request->name = app.toLocal8Bit();
++ request->name = app;
+
+ if (wait)
+ request->dbus_startup_type = KService::DBusWait;
+@@ -1113,7 +1137,7 @@
+ }
+ if (mSlaveValgrind == arg1)
+ {
+- arg_list.prepend(QFile::encodeName(KLibLoader::findLibrary(name.toLocal8Bit())));
++ arg_list.prepend(QFile::encodeName(KLibLoader::findLibrary(name)));
+ arg_list.prepend(QFile::encodeName(KStandardDirs::locate("exe", "kioslave")));
+ name = "valgrind";
+ if (!mSlaveValgrindSkin.isEmpty()) {
+Index: kdelibs/kinit/klauncher.h
+===================================================================
+--- kdelibs/kinit/klauncher.h (revision 918653)
++++ kdelibs/kinit/klauncher.h (revision 918654)
+@@ -87,6 +87,7 @@
+ QString name;
+ QStringList arg_list;
+ QString dbus_name;
++ QString tolerant_dbus_name;
+ enum status_t { Init = 0, Launching, Running, Error, Done };
+ pid_t pid;
+ status_t status;
Added: branches/kde4.2/packages/kdelibs/debian/patches/01_r918838_kded_desktop_file_watch.diff
===================================================================
--- branches/kde4.2/packages/kdelibs/debian/patches/01_r918838_kded_desktop_file_watch.diff (rev 0)
+++ branches/kde4.2/packages/kdelibs/debian/patches/01_r918838_kded_desktop_file_watch.diff 2009-01-31 07:34:23 UTC (rev 13684)
@@ -0,0 +1,94 @@
+https://bugs.kde.org/show_bug.cgi?id=182472
+
+kdelibs/kded/kded.cpp
+===================================================================
+--- kdelibs/kded/kded.cpp (revision 918837)
++++ kdelibs/kded/kded.cpp (revision 918838)
+@@ -115,9 +115,8 @@
+ KToolInvocation::kdeinitExecWait( "kdontchangethehostname", args );
+ }
+
+-Kded::Kded(bool checkUpdates)
+- : b_checkUpdates(checkUpdates),
+- m_needDelayedCheck(false)
++Kded::Kded()
++ : m_needDelayedCheck(false)
+ {
+ _self = this;
+
+@@ -280,7 +279,7 @@
+ KSharedConfig::Ptr config = KGlobal::config();
+ // Ensure the service exists.
+ KService::Ptr service = KService::serviceByDesktopPath("kded/"+obj+".desktop");
+- if (!service)
++ if (!service)
+ return;
+ KConfigGroup cg(config, QString("Module-%1").arg(service->desktopEntryName()));
+ cg.writeEntry("autoload", autoload);
+@@ -290,7 +289,7 @@
+ bool Kded::isModuleAutoloaded(const QString &obj) const
+ {
+ KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop");
+- if (!s)
++ if (!s)
+ return false;
+ return isModuleAutoloaded(s);
+ }
+@@ -307,7 +306,7 @@
+ bool Kded::isModuleLoadedOnDemand(const QString &obj) const
+ {
+ KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop");
+- if (!s)
++ if (!s)
+ return false;
+ return isModuleLoadedOnDemand(s);
+ }
+@@ -446,7 +445,7 @@
+
+ void Kded::updateDirWatch()
+ {
+- if (!b_checkUpdates) return;
++ if (!bCheckUpdates) return;
+
+ delete m_pDirWatch;
+ m_pDirWatch = new KDirWatch;
+@@ -471,7 +470,7 @@
+ {
+ delete KSycoca::self();
+
+- if (!b_checkUpdates) return;
++ if (!bCheckUpdates) return;
+
+ if (delayedCheck) return;
+
+@@ -921,7 +920,7 @@
+ checkStamps = cg.readEntry("CheckFileStamps", true);
+ delayedCheck = cg.readEntry("DelayedCheck", false);
+
+- Kded *kded = new Kded(false); // Build data base
++ Kded *kded = new Kded(); // Build data base
+
+ KDE_signal(SIGTERM, sighandler);
+ KDE_signal(SIGHUP, sighandler);
+Index: kdelibs/kded/kded.h
+===================================================================
+--- kdelibs/kded/kded.h (revision 918837)
++++ kdelibs/kded/kded.h (revision 918838)
+@@ -41,7 +41,7 @@
+ {
+ Q_OBJECT
+ public:
+- Kded(bool checkUpdates);
++ Kded();
+ virtual ~Kded();
+
+ static Kded *self() { return _self;}
+@@ -186,8 +186,6 @@
+ */
+ KDirWatch* m_pDirWatch;
+
+- bool b_checkUpdates;
+-
+ /**
+ * When a desktop file is updated, a timer is started (5 sec)
+ * before rebuilding the binary - so that multiple updates result
Modified: branches/kde4.2/packages/kdelibs/debian/patches/series
===================================================================
--- branches/kde4.2/packages/kdelibs/debian/patches/series 2009-01-31 06:57:37 UTC (rev 13683)
+++ branches/kde4.2/packages/kdelibs/debian/patches/series 2009-01-31 07:34:23 UTC (rev 13684)
@@ -1,5 +1,9 @@
00_917014_kde4.2.0_tag.diff
00_917133_qreal_portability_fix.diff
+01_r917170_kio_update_on_break.diff
+01_r918403_klauncher_hang.diff
+01_r918654_klauncher_unique_app.diff
+01_r918838_kded_desktop_file_watch.diff
08_add_debian_build_type.diff
09_disable_debug_messages_if_not_explicitly_enabled.diff
11_default_kde4_xdg_menu_prefix.diff
More information about the pkg-kde-commits
mailing list