Subject: Re: python exiting w/curses and w/o a terminal; failure of try/except
To: Thanos Tsouanas <thanos@sians.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-help
Date: 01/20/2005 08:10:58
One can simply fix the bittorrent source.

Also, btcompletedir.py fails, because it passes None for piece size,
trying to default I think.  The following patch adds a patch to make
the piece size 2^17.

I'll file a PR with this.

Index: Makefile
===================================================================
RCS file: /NETBSD-CVS/pkgsrc/net/bittorrent/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- Makefile	3 Oct 2004 00:17:49 -0000	1.23
+++ Makefile	20 Jan 2005 12:55:59 -0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.22 2004/04/27 03:43:54 snj Exp $
+# $NetBSD: Makefile,v 1.23 2004/10/03 00:17:49 tv Exp $
 #
 
 .include "Makefile.common"
 
 PKGNAME=	${DISTNAME:S/BitT/bitt/}
-PKGREVISION=	1
+PKGREVISION=	3
 
 PYDISTUTILSPKG=	YES
 
Index: distinfo
===================================================================
RCS file: /NETBSD-CVS/pkgsrc/net/bittorrent/distinfo,v
retrieving revision 1.11
diff -u -r1.11 distinfo
--- distinfo	25 May 2004 12:42:19 -0000	1.11
+++ distinfo	20 Jan 2005 12:55:59 -0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.10 2004/03/29 23:39:43 wiz Exp $
+$NetBSD: distinfo,v 1.11 2004/05/25 12:42:19 wiz Exp $
 
 SHA1 (BitTorrent-3.4.2.zip) = e3c34b0988369e706564f24fc63d9921c6af8298
 Size (BitTorrent-3.4.2.zip) = 244989 bytes
 SHA1 (patch-aa) = 8c3abb81127bda1594b944fd6e11f587e8477e87
 SHA1 (patch-ab) = 186ad86d153bc0c7a3e3234c03ec854b2325cb03
+SHA1 (patch-ac) = 458e7157bd89200ef5a7e6d8de7702220252fc5a
+SHA1 (patch-ad) = 4b6d5e4e1b2b3e5c1bf68112641577a5c5ccee90
Index: patches/patch-ac
===================================================================
RCS file: patches/patch-ac
diff -N patches/patch-ac
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-ac	20 Jan 2005 12:55:59 -0000
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- btdownloadheadless.py.orig	2003-09-21 10:58:45.000000000 -0400
++++ btdownloadheadless.py
+@@ -146,13 +146,7 @@ def print_spew(spew):
+     print s.getvalue()
+ 
+ def run(params):
+-    try:
+-        import curses
+-        curses.initscr()
+-        cols = curses.COLS
+-        curses.endwin()
+-    except:
+-        cols = 80
++    cols = 80
+ 
+     h = HeadlessDisplayer()
+     download(params, h.chooseFile, h.display, h.finished, h.error, Event(), cols, h.newpath)
Index: patches/patch-ad
===================================================================
RCS file: patches/patch-ad
diff -N patches/patch-ad
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-ad	20 Jan 2005 12:55:59 -0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- btcompletedir.py.orig	2004-03-03 12:44:28.000000000 -0500
++++ btcompletedir.py
+@@ -12,7 +12,7 @@ from btmakemetafile import calcsize, mak
+ def dummy(x):
+     pass
+ 
+-def completedir(files, url, flag = Event(), vc = dummy, fc = dummy, piece_len_pow2 = None):
++def completedir(files, url, flag = Event(), vc = dummy, fc = dummy, piece_len_pow2 = 17):
+     files.sort()
+     ext = '.torrent'
+ 



-- 
        Greg Troxel <gdt@ir.bbn.com>