diff options
author | Patrick Kursawe <phosphan@gentoo.org> | 2003-05-07 05:46:23 +0000 |
---|---|---|
committer | Patrick Kursawe <phosphan@gentoo.org> | 2003-05-07 05:46:23 +0000 |
commit | a1ba8a76639efda6efaa2e9043b1b954b2ee4a33 (patch) | |
tree | a2e9969b1128b48de133a7187fcb215de5d7b3f2 /net-p2p | |
parent | Closes bug 20524 (overflows and progress bar problems) (diff) | |
download | historical-a1ba8a76639efda6efaa2e9043b1b954b2ee4a33.tar.gz historical-a1ba8a76639efda6efaa2e9043b1b954b2ee4a33.tar.bz2 historical-a1ba8a76639efda6efaa2e9043b1b954b2ee4a33.zip |
Closes bug 20524 (overflows and progress bar problems)
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/bittorrent/Manifest | 4 | ||||
-rw-r--r-- | net-p2p/bittorrent/bittorrent-3.2.1b-r1.ebuild | 45 | ||||
-rw-r--r-- | net-p2p/bittorrent/files/bittorrent-3.2.1b.patch | 146 | ||||
-rw-r--r-- | net-p2p/bittorrent/files/digest-bittorrent-3.2.1b-r1 | 1 |
4 files changed, 194 insertions, 2 deletions
diff --git a/net-p2p/bittorrent/Manifest b/net-p2p/bittorrent/Manifest index 5ccb6305ab4a..28815119b62e 100644 --- a/net-p2p/bittorrent/Manifest +++ b/net-p2p/bittorrent/Manifest @@ -1,7 +1,7 @@ MD5 be16d9b7fde53306624acbee27d45e5b bittorrent-3.2.1b.ebuild 1212 -MD5 9e2ceaaae313e047fcbc6eed9e8a43ce bittorrent-3.2.1b-r1.ebuild 1288 +MD5 9c8b6d20b4b666a614ef2a48e7584302 bittorrent-3.2.1b-r1.ebuild 1292 MD5 08d924316cb9e9d5c862eaf954a51572 bittorrent-3.2.1.ebuild 1211 -MD5 9b66cca10cfdeeb4983d6b07e2e0f442 ChangeLog 856 +MD5 22df609cb75b6e970cd2db8fcfa9aedc ChangeLog 1168 MD5 18e4d423bad1434f67f294f131f2e181 files/digest-bittorrent-3.2.1b 69 MD5 18e4d423bad1434f67f294f131f2e181 files/digest-bittorrent-3.2.1b-r1 69 MD5 7bc9832711abd6cc2e334adca1335f74 files/bittorrent-3.2.1b.patch 6500 diff --git a/net-p2p/bittorrent/bittorrent-3.2.1b-r1.ebuild b/net-p2p/bittorrent/bittorrent-3.2.1b-r1.ebuild new file mode 100644 index 000000000000..efb763f38e60 --- /dev/null +++ b/net-p2p/bittorrent/bittorrent-3.2.1b-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/bittorrent/bittorrent-3.2.1b-r1.ebuild,v 1.1 2003/05/07 05:46:14 phosphan Exp $ + +inherit distutils + +MY_P="${P/bittorrent/BitTorrent}" +S=${WORKDIR}/${MY_P} +DESCRIPTION="BitTorrent is a tool for distributing files via a distributed network of nodes" +SRC_URI="http://bitconjurer.org/BitTorrent/${MY_P}.tar.gz" +HOMEPAGE="http://bitconjurer.org/BitTorrent" +SLOT="0" +LICENSE="MIT" +KEYWORDS="~x86" + +IUSE="" + +RDEPEND=">=dev-python/wxPython-2.2 + >=dev-lang/python-2.1" +DEPEND="${RDEPEND} + >=sys-apps/sed-4.0.5" + + +mydoc="FAQ.txt README.txt LICENSE.txt" + +src_unpack() { + unpack ${A} + cd ${S} + patch -p0 < ${FILESDIR}/${P}.patch +} + +pkg_postinst() { + MAILCAP_STRING="application/x-bittorrent; /usr/bin/btdownloadgui.py '%s'; test=test -n \"\$DISPLAY\"" + + if [ -n "`grep 'application/x-bittorrent' /etc/mailcap`" ]; then + # replace bittorrent entry if it already exists + einfo "updating bittorrent mime info" + sed -i "s,application/x-bittorrent;.*,${MAILCAP_STRING}," /etc/mailcap + else + # add bittorrent entry if it doesn't exist + einfo "adding bittorrent mime info" + echo "${MAILCAP_STRING}" >> /etc/mailcap + fi +} + diff --git a/net-p2p/bittorrent/files/bittorrent-3.2.1b.patch b/net-p2p/bittorrent/files/bittorrent-3.2.1b.patch new file mode 100644 index 000000000000..07448836eac9 --- /dev/null +++ b/net-p2p/bittorrent/files/bittorrent-3.2.1b.patch @@ -0,0 +1,146 @@ +--- btdownloadgui.py 2003-05-06 12:44:32.000000000 +0200 ++++ /usr/bin/btdownloadgui.py 2003-05-06 10:31:18.000000000 +0200 +@@ -21,7 +21,7 @@ + return '<unknown>' + if n == 0: + return 'complete!' +- n = int(n) ++ n = int(long(n)) + h, r = divmod(n, 60 * 60) + m, sec = divmod(r, 60) + if h > 1000000: +@@ -128,8 +128,8 @@ + + def onUpdateStatus(self, fractionDone, timeEst, downRate, upRate, activity): + if fractionDone is not None and not self.fin: +- self.gauge.SetValue(int(fractionDone * 1000)) +- self.frame.SetTitle('%d%% %s - BitTorrent %s' % (int(fractionDone*100), self.filename, version)) ++ self.gauge.SetValue(int(long(fractionDone * 1000))) ++ self.frame.SetTitle('%d%% %s - BitTorrent %s' % (int(long(fractionDone*100)), self.filename, version)) + if timeEst is not None: + self.timeEstText.SetLabel(hours(timeEst)) + if activity is not None and not self.fin: +--- btdownloadheadless.py 2003-03-17 20:26:39.000000000 +0100 ++++ /usr/bin/btdownloadheadless.py 2003-05-06 10:32:01.000000000 +0200 +@@ -58,7 +59,7 @@ + def display(self, fractionDone = None, timeEst = None, + downRate = None, upRate = None, activity = None): + if fractionDone is not None: +- self.percentDone = str(float(int(fractionDone * 1000)) / 10) ++ self.percentDone = str(float(long(fractionDone * 1000)) / 10) + if timeEst is not None: + self.timeEst = hours(timeEst) + if activity is not None and not self.done: +--- BitTorrent/Choker.py 2003-03-25 09:32:18.000000000 +0100 ++++ /usr/lib/python2.2/site-packages/BitTorrent/Choker.py 2003-05-06 10:33:58.000000000 +0200 +@@ -59,7 +59,7 @@ + + def connection_made(self, connection, p = None): + if p is None: +- p = randrange(-2, len(self.connections) + 1) ++ p = randrange(-2, len(self.connections) + 1, int=long) + self.connections.insert(max(p, 0), connection) + self._rechoke() + +--- BitTorrent/track.py 2003-03-28 03:10:45.000000000 +0100 ++++ /usr/lib/python2.2/site-packages/BitTorrent/track.py 2003-05-06 10:34:24.000000000 +0200 +@@ -230,7 +230,7 @@ + if not value.get('nat'): + cache.append({'peer id': key, 'ip': value['ip'], + 'port': value['port']}) +- shuffle(cache) ++ shuffle(cache, int=long) + data['peers'] = cache[-rsize:] + del cache[-rsize:] + connection.answer((200, 'OK', {'Content-Type': 'text/plain', 'Pragma': 'no-cache'}, bencode(data))) +--- BitTorrent/EndgameDownloader.py 2002-12-27 11:06:55.000000000 +0100 ++++ /usr/lib/python2.2/site-packages/BitTorrent/EndgameDownloader.py 2003-05-06 10:35:59.000000000 +0200 +@@ -27,7 +27,7 @@ + self.interested = old.interested + self.measure = old.measure + self.last = old.last +- shuffle(downloader.requests) ++ shuffle(downloader.requests, int=long) + for h in self.have: + if h: + self.unhave -= 1 +@@ -47,7 +47,7 @@ + def got_unchoke(self): + if not self.choked or not self.interested: + return +- shuffle(self.downloader.requests) ++ shuffle(self.downloader.requests, int=long) + for (index, begin, length) in self.downloader.requests: + if self.have[index]: + self.connection.send_request(index, begin, length) +@@ -89,7 +89,7 @@ + self.downloader.requests.append((index, a, b)) + for d in self.downloader.downloads: + if not d.choked and d.have[index]: +- shuffle(n) ++ shuffle(n, int=long) + for (a, b) in n: + if a != begin or d is self: + d.send_request(index, a, b) +@@ -121,7 +121,7 @@ + self.unhave -= 1 + if self.downloader.storage.do_I_have(index): + return +- shuffle(self.downloader.requests) ++ shuffle(self.downloader.requests, int=long) + for i, begin, length in self.downloader.requests: + if i == index: + self.send_request(i, begin, length) +@@ -133,7 +133,7 @@ + for h in self.have: + if h: + self.unhave -= 1 +- shuffle(self.downloader.requests) ++ shuffle(self.downloader.requests, int=long) + for i, begin, length in self.downloader.requests: + if self.have[i]: + self.send_request(i, begin, length) +--- BitTorrent/PiecePicker.py 2003-02-02 06:47:20.000000000 +0100 ++++ /usr/lib/python2.2/site-packages/BitTorrent/PiecePicker.py 2003-05-06 10:42:13.000000000 +0200 +@@ -27,7 +27,7 @@ + break + self.num_done += 1 + y = len(interests) - self.num_done +- x = randrange(y + 1) ++ x = randrange(int(y + 1), int=long) + last = interests[x] + interests[x] = interests[y] + interests[y] = last +@@ -49,7 +49,7 @@ + self.l = [] + for x in self.picker.interests[1:]: + self.l.extend(x) +- shuffle(self.l) ++ shuffle(self.l, int=long) + if not self.l: + raise StopIteration + return self.l.pop() +--- BitTorrent/RawServer.py 2003-03-27 04:47:04.000000000 +0100 ++++ /usr/lib/python2.2/site-packages/BitTorrent/RawServer.py 2003-05-06 10:43:41.000000000 +0200 +@@ -187,7 +187,8 @@ + period = self.funcs[0][0] - time() + if period < 0: + period = 0 +- events = self.poll.poll(period * timemult) ++ permult = period * timemult ++ events = self.poll.poll(int(long(permult))) + if self.doneflag.isSet(): + return + while len(self.funcs) > 0 and self.funcs[0][0] <= time(): +--- BitTorrent/StorageWrapper.py 2003-03-21 07:15:09.000000000 +0100 ++++ /usr/lib/python2.2/site-packages/BitTorrent/StorageWrapper.py 2003-05-06 10:44:52.000000000 +0200 +@@ -46,7 +46,8 @@ + self._check_single(i) + if flag.isSet(): + return +- statusfunc(fractionDone = float(i+1)/len(hashes)) ++ fractionDone = float(i+1)/len(hashes) ++ statusfunc(fractionDone) + else: + for i in xrange(len(hashes)): + self._check_single(i, false) diff --git a/net-p2p/bittorrent/files/digest-bittorrent-3.2.1b-r1 b/net-p2p/bittorrent/files/digest-bittorrent-3.2.1b-r1 new file mode 100644 index 000000000000..cfa354976ae9 --- /dev/null +++ b/net-p2p/bittorrent/files/digest-bittorrent-3.2.1b-r1 @@ -0,0 +1 @@ +MD5 9e0cc346a4bfa3904380ed119d8bac90 BitTorrent-3.2.1b.tar.gz 144420 |