[csw-devel] SF.net SVN: gar:[21682] csw/mgar/pkg/tracker/trunk

slowfranklin at users.sourceforge.net slowfranklin at users.sourceforge.net
Fri Aug 9 16:38:13 CEST 2013


Revision: 21682
          http://gar.svn.sourceforge.net/gar/?rev=21682&view=rev
Author:   slowfranklin
Date:     2013-08-09 14:38:12 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
tracker/trunk: Add a patch for another Linuxism

Modified Paths:
--------------
    csw/mgar/pkg/tracker/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/tracker/trunk/files/0008-libtracker-common-Use-procfs-psinfo-instead-of-cmdli.patch

Modified: csw/mgar/pkg/tracker/trunk/Makefile
===================================================================
--- csw/mgar/pkg/tracker/trunk/Makefile	2013-08-09 13:04:22 UTC (rev 21681)
+++ csw/mgar/pkg/tracker/trunk/Makefile	2013-08-09 14:38:12 UTC (rev 21682)
@@ -113,6 +113,8 @@
 PATCHFILES += 0003-Replace-uuid_unparse_lower-with-uuid_unparse.patch
 PATCHFILES += 0004-_XOPEN_SOURCE-hides-non-standard-stuff-__EXTENSIONS_.patch
 PATCHFILES += 0005-exempi-xmp.h-is-missing-a-stdbool.h-include.patch
+# Submitted upstream, should be in 0.16.3
+PATCHFILES += 0008-libtracker-common-Use-procfs-psinfo-instead-of-cmdli.patch
 
 # Packages
 PACKAGES += CSWtracker

Added: csw/mgar/pkg/tracker/trunk/files/0008-libtracker-common-Use-procfs-psinfo-instead-of-cmdli.patch
===================================================================
--- csw/mgar/pkg/tracker/trunk/files/0008-libtracker-common-Use-procfs-psinfo-instead-of-cmdli.patch	                        (rev 0)
+++ csw/mgar/pkg/tracker/trunk/files/0008-libtracker-common-Use-procfs-psinfo-instead-of-cmdli.patch	2013-08-09 14:38:12 UTC (rev 21682)
@@ -0,0 +1,52 @@
+From 553c8845bdbca567eedd35fa8aa37af653ced013 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <sloowfranklin at gmail.com>
+Date: Fri, 9 Aug 2013 16:27:48 +0200
+Subject: [PATCH] libtracker-common: Use procfs psinfo instead of cmdline on
+ Solaris
+
+---
+ src/libtracker-common/tracker-dbus.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/src/libtracker-common/tracker-dbus.c b/src/libtracker-common/tracker-dbus.c
+index c086f83..beb1814 100644
+--- a/src/libtracker-common/tracker-dbus.c
++++ b/src/libtracker-common/tracker-dbus.c
+@@ -31,6 +31,10 @@
+ #include <kvm.h>
+ #endif
+ 
++#ifdef __sun
++#include <procfs.h>
++#endif
++
+ #include "tracker-dbus.h"
+ #include "tracker-log.h"
+ 
+@@ -153,6 +157,9 @@ client_data_new (gchar *sender)
+ 		gchar *contents = NULL;
+ 		GError *error = NULL;
+ 		gchar **strv;
++#ifdef __sun /* Solaris */
++		psinfo_t psinfo = { 0 };
++#endif
+ 
+ 		pid_str = g_strdup_printf ("%ld", cd->pid);
+ 		filename = g_build_filename (G_DIR_SEPARATOR_S,
+@@ -173,7 +180,13 @@ client_data_new (gchar *sender)
+ 
+ 		g_free (filename);
+ 
++#ifdef __sun /* Solaris */
++		memcpy (&psinfo, contents, sizeof (psinfo));
++		/* won't work with paths containing spaces :( */
++		strv = g_strsplit (psinfo.pr_psargs, " ", 2);
++#else
+ 		strv = g_strsplit (contents, "^@", 2);
++#endif
+ 		if (strv && strv[0]) {
+ 			cd->binary = g_path_get_basename (strv[0]);
+ 		}
+-- 
+1.8.3.4
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list