Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/tremc/files/, net-p2p/tremc/
Date: Mon, 29 Jun 2020 06:09:21
Message-Id: 1593410937.e1ee7c8b1aac3a2359a41a528cfc5733a181fb89.juippis@gentoo
1 commit: e1ee7c8b1aac3a2359a41a528cfc5733a181fb89
2 Author: John Helmert III <jchelmert3 <AT> posteo <DOT> net>
3 AuthorDate: Wed Jun 17 19:27:38 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 29 06:08:57 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1ee7c8b
7
8 net-p2p/tremc: Drop old
9
10 Package-Manager: Portage-2.3.101, Repoman-2.3.22
11 Signed-off-by: John Helmert III <jchelmert3 <AT> posteo.net>
12 Closes: https://github.com/gentoo/gentoo/pull/16303
13 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
14
15 net-p2p/tremc/Manifest | 1 -
16 net-p2p/tremc/files/0.9.1-fix-startup-crash.patch | 62 -----------------------
17 net-p2p/tremc/tremc-0.9.1.ebuild | 41 ---------------
18 3 files changed, 104 deletions(-)
19
20 diff --git a/net-p2p/tremc/Manifest b/net-p2p/tremc/Manifest
21 index 57e343bbe67..7e7b6b1bb16 100644
22 --- a/net-p2p/tremc/Manifest
23 +++ b/net-p2p/tremc/Manifest
24 @@ -1,2 +1 @@
25 -DIST tremc-0.9.1.tar.gz 315482 BLAKE2B c4e94ef13cc9d716cdbcbff061b1956d17c6babe765e192d675d08ad5d76a22cf171a4fb3f5f2952b971f59a16a2768ccd360d10df5b0f3325fd63ff9716f209 SHA512 ed16080c6544ce9019e6a0c4d660310992cae0f139a2a78e9eaa51841e293cefb22160a105794b5f03a4bfd47a2c50402879f2a17302a96265a9c9acb3174c39
26 DIST tremc-0.9.2.tar.gz 315631 BLAKE2B f5ed154fbfcbdb3e77b678a5827d3f68a6be4033530d6d4e451d57808d43cd5737fff32cf62445d246bfce4d8f02e4cac0c1156603e220e228e61b725d6deaf8 SHA512 d6d6d155ddac918d329226d5c3b53c63fd4fa0b98e30f1eb2cd2226ea598bd7dd81d72f747dc11f4a508bcc0453d90d774c1d8db6dac05ae1ecbc217290b7db3
27
28 diff --git a/net-p2p/tremc/files/0.9.1-fix-startup-crash.patch b/net-p2p/tremc/files/0.9.1-fix-startup-crash.patch
29 deleted file mode 100644
30 index 5e67e5d3155..00000000000
31 --- a/net-p2p/tremc/files/0.9.1-fix-startup-crash.patch
32 +++ /dev/null
33 @@ -1,62 +0,0 @@
34 -From 0cb919b446eeda41aea8578ae26796ae92a973e5 Mon Sep 17 00:00:00 2001
35 -From: George Angelopoulos <george@×××××××.net>
36 -Date: Mon, 2 Jul 2018 17:55:38 +0200
37 -Subject: [PATCH] fix addch ERR crash when starting with no torrents
38 -
39 -There was a bug introduced by commit e06d08d:
40 - scale_bytes: Simplify this function
41 -
42 -tremc would crash when started against a transmission-daemon with no
43 -torrents.
44 -
45 -This was because scale_bytes(0) used to return 0K but now it returns
46 -0.0K. The expected width of 2 was hardcoded. The new width of 4 causes
47 -addch() to return ERR because it tries to draw outside the window.
48 -
49 -Hardcoding the new width to 4 would resolve this issue. Instead,
50 -this patch dynamically sets the width returned by scale_bytes().
51 -This should make the code a tiny bit more readable and maybe avoid this
52 -issue in the future.
53 -
54 -There is one more magic number involved here which I don't see a good
55 -way of getting rid of. So I made an illustrative comment.
56 -
57 -Resolves #15
58 ----
59 - tremc | 6 ++++--
60 - 1 file changed, 4 insertions(+), 2 deletions(-)
61 -
62 -diff --git a/tremc b/tremc
63 -index 36ae67b..ed898fb 100755
64 ---- a/tremc
65 -+++ b/tremc
66 -@@ -883,7 +883,7 @@ class Interface(object):
67 - self.focus = -1 # -1: nothing focused; 0: top of list; <# of torrents>-1: bottom of list
68 - self.scrollpos = 0 # start of torrentlist
69 - self.torrents_per_page = 0 # will be set by manage_layout()
70 -- self.rateDownload_width = self.rateUpload_width = 2
71 -+ self.rateDownload_width = self.rateUpload_width = len(scale_bytes())
72 -
73 - self.details_category_focus = 0 # overview/files/peers/tracker in details
74 - self.focus_detaillist = -1 # same as focus but for details
75 -@@ -2667,6 +2667,8 @@ class Interface(object):
76 - pass
77 -
78 - def draw_global_rates(self):
79 -+ # ↑1.2K ↓3.4M
80 -+ # ^ ^^ => +3
81 - rates_width = self.rateDownload_width + self.rateUpload_width + 3
82 -
83 - if self.stats['alt-speed-enabled']:
84 -@@ -3373,7 +3375,7 @@ def timestamp(timestamp, format="%x %X"):
85 - return "%s (%s)" % (absolute, relative)
86 -
87 -
88 --def scale_bytes(bytes, type='short'):
89 -+def scale_bytes(bytes=0, type='short'):
90 - if bytes >= 1099511627776:
91 - scaled_bytes = round((bytes / 1099511627776.0), 1)
92 - unit = 'T'
93 ---
94 -2.26.0
95 -
96
97 diff --git a/net-p2p/tremc/tremc-0.9.1.ebuild b/net-p2p/tremc/tremc-0.9.1.ebuild
98 deleted file mode 100644
99 index 8306b1e2dfa..00000000000
100 --- a/net-p2p/tremc/tremc-0.9.1.ebuild
101 +++ /dev/null
102 @@ -1,41 +0,0 @@
103 -# Copyright 1999-2020 Gentoo Authors
104 -# Distributed under the terms of the GNU General Public License v2
105 -
106 -EAPI=7
107 -
108 -PYTHON_COMPAT=( python3_{6,7,8} )
109 -PYTHON_REQ_USE="ncurses"
110 -inherit bash-completion-r1 python-single-r1
111 -
112 -DESCRIPTION="Ncurses interface for the Transmission BitTorrent client"
113 -HOMEPAGE="https://github.com/tremc/tremc"
114 -SRC_URI="https://github.com/tremc/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
115 -
116 -LICENSE="GPL-3"
117 -SLOT="0"
118 -KEYWORDS="~amd64 ~x86"
119 -IUSE="geoip"
120 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
121 -
122 -RDEPEND="${PYTHON_DEPS}
123 - $(python_gen_cond_dep '
124 - geoip? ( dev-python/geoip-python[${PYTHON_USEDEP}] )
125 - ')
126 -"
127 -
128 -# This fixes a crash when starting that was committed after 0.9.1
129 -PATCHES=( "${FILESDIR}/${PV}-fix-startup-crash.patch" )
130 -
131 -# Specify a no-op src_compile so upstream's broken Makefile doesn't get used
132 -src_compile() {
133 - :
134 -}
135 -
136 -src_install() {
137 - python_doscript tremc
138 - newbashcomp completion/bash/tremc.sh tremc
139 - insinto /usr/share/zsh/site-functions
140 - doins completion/zsh/_tremc
141 - doman tremc.1
142 - dodoc NEWS README.md
143 -}