Bug 107892 - Latest PythonTwisted update breaks jabber-pymsn-transport
Summary: Latest PythonTwisted update breaks jabber-pymsn-transport
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Renato Botelho
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-13 23:10 UTC by neil
Modified: 2007-01-15 12:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description neil 2007-01-13 23:10:34 UTC
Following the latest PythonTwisted update, attempting to start
jabber-pymsn-transport gives the following:

Starting jabber_pymsn.
Traceback (most recent call last):
  File "/usr/local/lib/jabber/pymsn/PyMSNt.py", line 14, in ?
    main.main()
  File "/usr/local/lib/jabber/pymsn/src/main.py", line 397, in main
    app = App()
  File "/usr/local/lib/jabber/pymsn/src/main.py", line 334, in __init__
    twistd.checkPID(config.pid)
AttributeError: 'module' object has no attribute 'checkPID'
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-01-13 23:12:55 UTC
State Changed
From-To: open->feedback

which port is PythonTwisted coming from?
Comment 2 neil 2007-01-14 12:17:42 UTC
PythonTwisted refers to a number of ports which are a dependency of
jabber-msn-transport, i.e. py-twistedCore, py-twistedWeb and
py-twistedWords, all of which have received updates.

Although one, or more, of these packages breaks jabber-msn-transport it
is jabber-msn-transport itself that needs to be updated. garga is
usually very efficient at doing this when given a bug report.
Comment 3 Renato Botelho freebsd_committer freebsd_triage 2007-01-14 19:23:51 UTC
Responsible Changed
From-To: freebsd-ports-bugs->garga

I'll take it.
Comment 4 Renato Botelho freebsd_committer freebsd_triage 2007-01-14 19:52:26 UTC
I found the problem, twisted.scripts.twistd was moved to
twisted.scripts._twistd_unix.

Here is a patch, could you test it for me and give me a feedback before I
commit this change?

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net-im/jabber-pymsn/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- Makefile	17 Aug 2006 15:51:56 -0000	1.19
+++ Makefile	14 Jan 2007 19:21:00 -0000
@@ -5,8 +5,7 @@
 # $FreeBSD: ports/net-im/jabber-pymsn/Makefile,v 1.19 2006/08/17 15:51:56 garga Exp $
 
 PORTNAME=	pymsn
-DISTVERSION=	0.11.2-dev2
-PORTREVISION=	1
+DISTVERSION=	0.11.2
 PORTEPOCH=	1
 CATEGORIES=	net-im
 MASTER_SITES=	http://delx.cjb.net/pymsnt/tarballs/ \
@@ -74,6 +73,7 @@
 		${WRKSRC}/src/main.py
 	@${REINPLACE_CMD} -i "" 's|#!.*$$|#!${LOCAL_PYTHON}|' \
 		${WRKSRC}/PyMSNt.py
+	@${RM} -f ${WRKSRC}/src/main.py.orig
 
 do-install:
 	${MKDIR} ${INST_DIR}/src ${INST_DIR}/data
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/net-im/jabber-pymsn/distinfo,v
retrieving revision 1.9
diff -u -r1.9 distinfo
--- distinfo	15 Aug 2006 21:38:02 -0000	1.9
+++ distinfo	14 Jan 2007 19:21:00 -0000
@@ -1,3 +1,3 @@
-MD5 (jabber/pymsnt-0.11.2-dev2.tar.gz) = 92494ba56a9b2c553b44f14cbad20e1d
-SHA256 (jabber/pymsnt-0.11.2-dev2.tar.gz) = 6fd35ce292147aaeaf68e7d84ed0aefc092cf745b638fd463b07d53fdcb9a661
-SIZE (jabber/pymsnt-0.11.2-dev2.tar.gz) = 313504
+MD5 (jabber/pymsnt-0.11.2.tar.gz) = 855cb25e2254522ba98ba02d59fdd9b6
+SHA256 (jabber/pymsnt-0.11.2.tar.gz) = d0d7064f50133453d170008e075de2d3ec0138e593c5bc9ec4052cfb2fe28459
+SIZE (jabber/pymsnt-0.11.2.tar.gz) = 311947
Index: files/patch-src_main.py
===================================================================
RCS file: files/patch-src_main.py
diff -N files/patch-src_main.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-src_main.py	14 Jan 2007 19:21:00 -0000
@@ -0,0 +1,37 @@
+--- src/main.py.orig	Sun Jan 14 17:12:38 2007
++++ src/main.py	Sun Jan 14 17:12:43 2007
+@@ -332,14 +332,14 @@
+ 		if config.pid and os.name != "posix":
+ 			config.pid = ""
+ 		if config.pid:
+-			twistd.checkPID(config.pid)
++			checkPID(config.pid)
+ 
+ 		# Do any auto-update stuff
+ 		housekeep.init()
+ 		
+ 		# Daemonise the process and write the PID file
+ 		if config.background and os.name == "posix":
+-			twistd.daemonize()
++			daemonize()
+ 		if config.pid:
+ 			self.writePID()
+ 
+@@ -369,7 +369,7 @@
+ 		# Keep the transport running for another 3 seconds
+ 		def cb(ignored=None):
+ 			if config.pid:
+-				twistd.removePID(config.pid)
++				removePID(config.pid)
+ 		d = Deferred()
+ 		d.addCallback(cb)
+ 		reactor.callLater(3.0, d.callback, None)
+@@ -390,7 +390,7 @@
+ 	# Set SIGHUP to reload the config file & close & open debug file
+ 	signal.signal(signal.SIGHUP, SIGHUPstuff)
+ 	# Load some scripts for PID and daemonising
+-	from twisted.scripts import twistd
++	from twisted.scripts._twistd_unix import checkPID, removePID, daemonize
+ 
+ 
+ def main():

Thanks
-- 
Renato Botelho <garga @ FreeBSD.org>
               <freebsd @ galle.com.br>
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc

Every improvement in communication makes the bore more terrible.
		-- Frank Moore Colby
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-01-15 12:03:36 UTC
garga       2007-01-15 12:03:27 UTC

  FreeBSD ports repository

  Modified files:
    net-im/jabber-pymsn  Makefile distinfo 
  Added files:
    net-im/jabber-pymsn/files patch-src_main.py 
  Log:
  - Update to 0.11.2
  - Add patch to fix work with py-twisted-2.5.0
  
  PR:             ports/107892
  Submitted by:   Neil Darlow <neil@darlow.co.uk>
  Obtained from:  py-transports maillist (Lars T. Mikkelsen)
  
  Revision  Changes    Path
  1.20      +2 -2      ports/net-im/jabber-pymsn/Makefile
  1.10      +3 -3      ports/net-im/jabber-pymsn/distinfo
  1.3       +14 -0     ports/net-im/jabber-pymsn/files/patch-src_main.py (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Renato Botelho freebsd_committer freebsd_triage 2007-01-15 12:04:03 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!