Bug 65846 - [UPDATE] misc/py-pexpect to latest version (0.99 -> 0.999)
Summary: [UPDATE] misc/py-pexpect to latest version (0.99 -> 0.999)
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-21 11:20 UTC by Marco Molteni
Modified: 2004-05-10 20:27 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 Marco Molteni 2004-04-21 11:20:10 UTC
	Update of misc/py-pexpect to latest version (0.99 -> 0.999)

Fix: Apply following patch





-- 
marco--T1SnyAz4W6mHHNSnkiz0LmppFrFMV52KAUe6Jcmm1rYajcmJ
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

diff --unified=6 --show-c-function -rN py-pexpect/Makefile py-pexpect999/Makefile
--- py-pexpect/Makefile Sun Jan 11 03:14:33 2004
+++ py-pexpect999/Makefile      Wed Apr 21 11:59:13 2004
@@ -1,16 +1,16 @@
 # ex:ts=8
 # Ports collection makefile for:       pexpect
 # Date created:                        Jan 11, 2003
 # Whom:                                ijliao
 #
-# $FreeBSD: ports/misc/py-pexpect/Makefile,v 1.4 2004/01/10 09:32:25 krion Exp $
+# $FreeBSD:$
 #
 
 PORTNAME=      pexpect
-PORTVERSION=   0.99
+PORTVERSION=   0.999
 CATEGORIES=    misc python
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=    ${PORTNAME}
 PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
 EXTRACT_SUFX=  .tgz
 
diff --unified=6 --show-c-function -rN py-pexpect/distinfo py-pexpect999/distinfo
--- py-pexpect/distinfo Fri Jan 30 03:08:54 2004
+++ py-pexpect999/distinfo      Wed Apr 21 12:00:55 2004
@@ -1,2 +1,2 @@
-MD5 (pexpect-0.99.tgz) = 597081031c64fc58dc9a0dc5bc6c078c
-SIZE (pexpect-0.99.tgz) = 19933
+MD5 (pexpect-0.999.tgz) = e426e5f54d323aaf392008c9eb35131d
+SIZE (pexpect-0.999.tgz) = 20190
How-To-Repeat: 	N/A
Comment 1 Marco Molteni 2004-04-26 13:56:35 UTC
There is a strange bug triggered if you use the latest version of python.
Please replace the previous patch with the following:


diff --unified=6 --show-c-function -rN py-pexpect/Makefile py-pexpect999/Makefile
--- py-pexpect/Makefile	Sun Jan 11 03:14:33 2004
+++ py-pexpect999/Makefile	Wed Apr 21 11:59:13 2004
@@ -1,16 +1,16 @@
 # ex:ts=8
 # Ports collection makefile for:	pexpect
 # Date created:			Jan 11, 2003
 # Whom:				ijliao
 #
-# $FreeBSD: ports/misc/py-pexpect/Makefile,v 1.4 2004/01/10 09:32:25 krion Exp $
+# $FreeBSD:$
 #
 
 PORTNAME=	pexpect
-PORTVERSION=	0.99
+PORTVERSION=	0.999
 CATEGORIES=	misc python
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 EXTRACT_SUFX=	.tgz
 
diff --unified=6 --show-c-function -rN py-pexpect/distinfo py-pexpect999/distinfo
--- py-pexpect/distinfo	Fri Jan 30 03:08:54 2004
+++ py-pexpect999/distinfo	Wed Apr 21 12:00:55 2004
@@ -1,2 +1,2 @@
-MD5 (pexpect-0.99.tgz) = 597081031c64fc58dc9a0dc5bc6c078c
-SIZE (pexpect-0.99.tgz) = 19933
+MD5 (pexpect-0.999.tgz) = e426e5f54d323aaf392008c9eb35131d
+SIZE (pexpect-0.999.tgz) = 20190
diff --unified=6 --show-c-function -rN py-pexpect/files/patch-pexpect.py py-pexpect999/files/patch-pexpect.py
--- py-pexpect/files/patch-pexpect.py	Thu Jan  1 01:00:00 1970
+++ py-pexpect999/files/patch-pexpect.py	Mon Apr 26 14:51:02 2004
@@ -0,0 +1,29 @@
+--- pexpect.py.orig	Mon Apr 26 14:16:08 2004
++++ pexpect.py	Mon Apr 26 14:19:45 2004
+@@ -498,21 +498,24 @@ class spawn:
+             pid, status = os.waitpid(self.pid, os.WNOHANG)
+         except OSError:
+             return 0
+ 
+         # I have to do this twice for Solaris.
+         # I can't even believe that I figured this out...
+-        if pid == 0 and status == 0:
++
++        # If waitpid() returns 0 it means that no child process wishes to
++        # report, and the value of status is undefined.
++        if pid == 0:
+             try:
+                 pid, status = os.waitpid(self.pid, os.WNOHANG)
+                 #print 'Solaris sucks'
+             except OSError: # This is crufty. When does this happen?
+                 return 0
+             # If pid and status is still 0 after two calls to waitpid() then
+             # the process really is alive. This seems to work on all platforms.
+-            if pid == 0 and status == 0:
++            if pid == 0:
+                 return 1
+ 
+         # I do not OR this together because I want hooks for debugging.
+         if os.WIFEXITED (status):
+             self.exitstatus = os.WEXITSTATUS(status)
+             return 0
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2004-05-10 20:27:41 UTC
State Changed
From-To: open->closed

Committed, thanks.