o A better fix for the python 2.4 issue: there are still some minor

adjustments required but the port is quite useable again
o Bump PORTREVISION

PR:		74883
Submitted by:	Jonathan Lennox <lennox@cs.columbia.edu>
Reviewed by:	Randy Pratt <rpratt1950@earthlink.net>
This commit is contained in:
Mario Sergio Fujikawa Ferreira 2004-12-10 18:51:16 +00:00
parent 61985d199d
commit 1aaf9c5b59
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=123648
12 changed files with 126 additions and 18 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@ -44,9 +44,9 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
.endif
post-extract:
#post-extract:
# patch to work with python 2.4
@${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
post-patch:
@${FIND} ${WRKSRC} -type f | \

View file

@ -0,0 +1,18 @@
--- BitTorrent/zurllib.py.orig Thu Dec 9 10:36:43 2004
+++ BitTorrent/zurllib.py Thu Dec 9 10:38:19 2004
@@ -35,7 +35,14 @@
if DEBUG:
pprint.pprint(headers.dict)
url = fp.url
- return addinfourldecompress(fp, headers, url)
+ resp = addinfourldecompress(fp, headers, url)
+ # As of Python 2.4 http_open response also has 'code' and 'msg'
+ # members, and HTTPErrorProcessor breaks if they don't exist.
+ if 'code' in dir(fp):
+ resp.code = fp.code
+ if 'msg' in dir(fp):
+ resp.msg = fp.msg
+ return resp
class addinfourldecompress(addinfourl):

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@ -44,9 +44,9 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
.endif
post-extract:
#post-extract:
# patch to work with python 2.4
@${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
post-patch:
@${FIND} ${WRKSRC} -type f | \

View file

@ -0,0 +1,18 @@
--- BitTorrent/zurllib.py.orig Thu Dec 9 10:36:43 2004
+++ BitTorrent/zurllib.py Thu Dec 9 10:38:19 2004
@@ -35,7 +35,14 @@
if DEBUG:
pprint.pprint(headers.dict)
url = fp.url
- return addinfourldecompress(fp, headers, url)
+ resp = addinfourldecompress(fp, headers, url)
+ # As of Python 2.4 http_open response also has 'code' and 'msg'
+ # members, and HTTPErrorProcessor breaks if they don't exist.
+ if 'code' in dir(fp):
+ resp.code = fp.code
+ if 'msg' in dir(fp):
+ resp.msg = fp.msg
+ return resp
class addinfourldecompress(addinfourl):

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@ -44,9 +44,9 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
.endif
post-extract:
#post-extract:
# patch to work with python 2.4
@${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
post-patch:
@${FIND} ${WRKSRC} -type f | \

View file

@ -0,0 +1,18 @@
--- BitTorrent/zurllib.py.orig Thu Dec 9 10:36:43 2004
+++ BitTorrent/zurllib.py Thu Dec 9 10:38:19 2004
@@ -35,7 +35,14 @@
if DEBUG:
pprint.pprint(headers.dict)
url = fp.url
- return addinfourldecompress(fp, headers, url)
+ resp = addinfourldecompress(fp, headers, url)
+ # As of Python 2.4 http_open response also has 'code' and 'msg'
+ # members, and HTTPErrorProcessor breaks if they don't exist.
+ if 'code' in dir(fp):
+ resp.code = fp.code
+ if 'msg' in dir(fp):
+ resp.msg = fp.msg
+ return resp
class addinfourldecompress(addinfourl):

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@ -44,9 +44,9 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
.endif
post-extract:
#post-extract:
# patch to work with python 2.4
@${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
post-patch:
@${FIND} ${WRKSRC} -type f | \

View file

@ -0,0 +1,18 @@
--- BitTorrent/zurllib.py.orig Thu Dec 9 10:36:43 2004
+++ BitTorrent/zurllib.py Thu Dec 9 10:38:19 2004
@@ -35,7 +35,14 @@
if DEBUG:
pprint.pprint(headers.dict)
url = fp.url
- return addinfourldecompress(fp, headers, url)
+ resp = addinfourldecompress(fp, headers, url)
+ # As of Python 2.4 http_open response also has 'code' and 'msg'
+ # members, and HTTPErrorProcessor breaks if they don't exist.
+ if 'code' in dir(fp):
+ resp.code = fp.code
+ if 'msg' in dir(fp):
+ resp.msg = fp.msg
+ return resp
class addinfourldecompress(addinfourl):

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@ -44,9 +44,9 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
.endif
post-extract:
#post-extract:
# patch to work with python 2.4
@${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
post-patch:
@${FIND} ${WRKSRC} -type f | \

View file

@ -0,0 +1,18 @@
--- BitTorrent/zurllib.py.orig Thu Dec 9 10:36:43 2004
+++ BitTorrent/zurllib.py Thu Dec 9 10:38:19 2004
@@ -35,7 +35,14 @@
if DEBUG:
pprint.pprint(headers.dict)
url = fp.url
- return addinfourldecompress(fp, headers, url)
+ resp = addinfourldecompress(fp, headers, url)
+ # As of Python 2.4 http_open response also has 'code' and 'msg'
+ # members, and HTTPErrorProcessor breaks if they don't exist.
+ if 'code' in dir(fp):
+ resp.code = fp.code
+ if 'msg' in dir(fp):
+ resp.msg = fp.msg
+ return resp
class addinfourldecompress(addinfourl):

View file

@ -7,7 +7,7 @@
PORTNAME= BitTorrent
PORTVERSION= 3.4.2
PORTREVISION= 2
PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES?= net python
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
@ -44,9 +44,9 @@ pre-everything::
@${ECHO_MSG} '===> Define WITHOUT_GUI to disable GUI installation'
.endif
post-extract:
#post-extract:
# patch to work with python 2.4
@${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
# @${CP} ${FILESDIR}/zurllib.py ${WRKSRC}/BitTorrent
post-patch:
@${FIND} ${WRKSRC} -type f | \

View file

@ -0,0 +1,18 @@
--- BitTorrent/zurllib.py.orig Thu Dec 9 10:36:43 2004
+++ BitTorrent/zurllib.py Thu Dec 9 10:38:19 2004
@@ -35,7 +35,14 @@
if DEBUG:
pprint.pprint(headers.dict)
url = fp.url
- return addinfourldecompress(fp, headers, url)
+ resp = addinfourldecompress(fp, headers, url)
+ # As of Python 2.4 http_open response also has 'code' and 'msg'
+ # members, and HTTPErrorProcessor breaks if they don't exist.
+ if 'code' in dir(fp):
+ resp.code = fp.code
+ if 'msg' in dir(fp):
+ resp.msg = fp.msg
+ return resp
class addinfourldecompress(addinfourl):