From danny@ricin.com  Thu Dec  1 21:38:59 2005
Return-Path: <danny@ricin.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8182216A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 Dec 2005 21:38:59 +0000 (GMT)
	(envelope-from danny@ricin.com)
Received: from smtpq3.groni1.gr.home.nl (smtpq3.groni1.gr.home.nl [213.51.130.202])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7397343D94
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  1 Dec 2005 21:38:51 +0000 (GMT)
	(envelope-from danny@ricin.com)
Received: from [213.51.130.188] (port=56409 helo=smtp3.groni1.gr.home.nl)
	by smtpq3.groni1.gr.home.nl with esmtp (Exim 4.30)
	id 1Ehw8c-0005kk-HL; Thu, 01 Dec 2005 22:38:46 +0100
Received: from cp464173-a.dbsch1.nb.home.nl ([84.27.215.228]:62028)
	by smtp3.groni1.gr.home.nl with smtp (Exim 4.30)
	id 1Ehw8e-0005aC-Vl; Thu, 01 Dec 2005 22:38:49 +0100
Received: by cp464173-a.dbsch1.nb.home.nl (sSMTP sendmail emulation); Thu,  1 Dec 2005 22:36:40 +0000
Message-Id: <20051201213851.7397343D94@mx1.FreeBSD.org>
Date: Thu,  1 Dec 2005 22:36:40 +0000
From: "Danny Pansters" <danny@ricin.com>
Reply-To: Danny Pansters <danny@ricin.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Danny Pansters <danny@ricin.com> 
Subject: [maintainer] x11-toolkits/py-kde: patch for dcopexport 'void' bug
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         89819
>Category:       ports
>Synopsis:       [maintainer] x11-toolkits/py-kde: patch for dcopexport 'void' bug
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    mnag
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 01 21:40:10 GMT 2005
>Closed-Date:    Fri Dec 02 13:06:38 GMT 2005
>Last-Modified:  Fri Dec 02 13:06:38 GMT 2005
>Originator:     Danny Pansters
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD desktop.homenet 6.0-STABLE FreeBSD 6.0-STABLE #6: Sat Nov 5 19:10:14 UTC 2005 danny@desktop.homenet:/usr/obj/usr/src/sys/DESKTOP i386


	
>Description:
Fix a small bug in extensions/dcopexport.py that would have (k)dcop complain
when a void method gets executed, even though execution works fine.

This fix is provided by the PyKDE author.

	
>How-To-Repeat:
Run the example_dcopexport.py example, then dcop, e.g:

%dcop petshop-46787 "dead parrot" setParrotType "Big Bird"
call failed
%dcop petshop-46787 "dead parrot" getParrotType
Big Bird
>Fix:

	

--- py-kde.diff begins here ---
diff -ruN x11-toolkits/py-kde.old/Makefile x11-toolkits/py-kde/Makefile
--- x11-toolkits/py-kde.old/Makefile	Thu Dec  1 21:58:55 2005
+++ x11-toolkits/py-kde/Makefile	Thu Dec  1 21:58:15 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	kde
 PORTVERSION=	4.0.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	x11-toolkits python kde
 MASTER_SITES=	http://www.river-bank.demon.co.uk/download/PyKDE2/ \
 		http://freebsd.ricin.com/ports/distfiles/
diff -ruN x11-toolkits/py-kde.old/files/patch-extensions-dcopexport.py x11-toolkits/py-kde/files/patch-extensions-dcopexport.py
--- x11-toolkits/py-kde.old/files/patch-extensions-dcopexport.py	Thu Jan  1 00:00:00 1970
+++ x11-toolkits/py-kde/files/patch-extensions-dcopexport.py	Thu Dec  1 22:11:18 2005
@@ -0,0 +1,28 @@
+--- extensions/dcopexport.py.orig	Thu Dec  1 22:05:41 2005
++++ extensions/dcopexport.py	Thu Dec  1 22:06:24 2005
+@@ -85,15 +85,16 @@
+             result = self.method.pymethod (*arglist)
+ 
+         # marshall the result as 'replyData'
+-        s = QDataStream (replyData, IO_WriteOnly)
+-        if self.method.rtype in numericTypes:
+-            dcop_add (s, result, self.method.rtype)
+-        elif self.method.rtype in stringTypes and isinstance (result, str):
+-            dcop_add (s, eval ("%s('''%s''')" % (self.method.rtype, result)))
+-        elif self.method.rtype.startswith ("QMap") or self.method.rtype.startswith ("QValueList"):
+-            dcop_add (params, args [i], self.argtypes [i])
+-        else:
+-            dcop_add (s, result)
++        if self.method.rtype != "void":
++            s = QDataStream (replyData, IO_WriteOnly)
++            if self.method.rtype in numericTypes:
++                dcop_add (s, result, self.method.rtype)
++            elif self.method.rtype in stringTypes and isinstance (result, str):
++                dcop_add (s, eval ("%s('''%s''')" % (self.method.rtype, result)))
++            elif self.method.rtype.startswith ("QMap") or self.method.rtype.startswith ("QValueList"):
++                dcop_add (params, args [i], self.argtypes [i])
++            else:
++                dcop_add (s, result)
+ 
+         # use append because we want to return the replyType reference,
+         # not a new QCString
--- py-kde.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mnag 
Responsible-Changed-By: mnag 
Responsible-Changed-When: Thu Dec 1 21:46:53 GMT 2005 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89819 
State-Changed-From-To: open->closed 
State-Changed-By: mnag 
State-Changed-When: Fri Dec 2 13:06:37 GMT 2005 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=89819 
>Unformatted:
