Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/pwclient/files/, dev-vcs/pwclient/
Date: Mon, 27 Apr 2020 08:20:30
Message-Id: 1587975551.0c3e12b8af46b114793d6f3015620ab605adcf45.zlogene@gentoo
1 commit: 0c3e12b8af46b114793d6f3015620ab605adcf45
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 27 08:19:11 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 27 08:19:11 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c3e12b8
7
8 dev-vcs/pwclient: remove last-rited pkg
9
10 Closes: https://bugs.gentoo.org/710230
11
12 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
13
14 dev-vcs/pwclient/Manifest | 1 -
15 ...wclient-handle-missing-.pwclientrc-better.patch | 45 --------
16 ...e-print_function-for-better-py3-compatibi.patch | 101 -----------------
17 ...22616-0003-pwclient-basic-python3-support.patch | 125 ---------------------
18 dev-vcs/pwclient/metadata.xml | 5 -
19 dev-vcs/pwclient/pwclient-20141110122616.ebuild | 44 --------
20 6 files changed, 321 deletions(-)
21
22 diff --git a/dev-vcs/pwclient/Manifest b/dev-vcs/pwclient/Manifest
23 deleted file mode 100644
24 index a3d4daecb3e..00000000000
25 --- a/dev-vcs/pwclient/Manifest
26 +++ /dev/null
27 @@ -1 +0,0 @@
28 -DIST pwclient-20141110122616 23527 BLAKE2B 61a49c6104db0015d0cf9ea4fddefe3ccde6495d0a0caf918d858e535bbbd085ee5a80f856753ea547b1ac18fb22344036734a5814d06865bde2622368b88155 SHA512 4933b7c5b4129d5fa1e47fa09dd8a75e5e5aac3254d8ed4bb65f8e7363d082217deecf8fc99f53092b607c49eebf9144e335079472a790a0193d0c6cddcf433f
29
30 diff --git a/dev-vcs/pwclient/files/pwclient-20141110122616-0001-pwclient-handle-missing-.pwclientrc-better.patch b/dev-vcs/pwclient/files/pwclient-20141110122616-0001-pwclient-handle-missing-.pwclientrc-better.patch
31 deleted file mode 100644
32 index 43e2606efa6..00000000000
33 --- a/dev-vcs/pwclient/files/pwclient-20141110122616-0001-pwclient-handle-missing-.pwclientrc-better.patch
34 +++ /dev/null
35 @@ -1,45 +0,0 @@
36 -From 601e1362d63293ca567295f63cb52bcfeb5d9959 Mon Sep 17 00:00:00 2001
37 -From: Mike Frysinger <vapier@××××××××.org>
38 -Date: Tue, 5 May 2015 23:19:57 -0400
39 -Subject: [PATCH 1/3] pwclient: handle missing ~/.pwclientrc better
40 -
41 -The upgrade path will crash if ~/.pwclientrc doesn't exist, so add an
42 -explicit check for the file before we try to "upgrade" it.
43 -
44 -The default error messages don't mention the config file, so it can be
45 -a bit confusing what pwclient is complaining about when running.
46 -
47 -Signed-off-by: Mike Frysinger <vapier@××××××××.org>
48 ----
49 - apps/patchwork/bin/pwclient | 6 +++---
50 - 1 file changed, 3 insertions(+), 3 deletions(-)
51 -
52 -diff --git a/apps/patchwork/bin/pwclient b/apps/patchwork/bin/pwclient
53 -index 2a80981..56aa909 100755
54 ---- a/apps/patchwork/bin/pwclient
55 -+++ b/apps/patchwork/bin/pwclient
56 -@@ -552,7 +552,7 @@ def main():
57 - config = ConfigParser.ConfigParser()
58 - config.read([CONFIG_FILE])
59 -
60 -- if not config.has_section('options'):
61 -+ if not config.has_section('options') and os.path.exists(CONFIG_FILE):
62 - sys.stderr.write('~/.pwclientrc is in the old format. Migrating it...')
63 -
64 - old_project = config.get('base','project')
65 -@@ -590,10 +590,10 @@ def main():
66 - sys.exit(1)
67 -
68 - if not config.has_section(project_str):
69 -- sys.stderr.write("No section for project %s\n" % project_str)
70 -+ sys.stderr.write('No section for project %s in ~/.pwclientrc\n' % project_str)
71 - sys.exit(1)
72 - if not config.has_option(project_str, 'url'):
73 -- sys.stderr.write("No URL for project %s\n" % project_str)
74 -+ sys.stderr.write('No URL for project %s in ~/.pwclientrc\n' % project_str)
75 - sys.exit(1)
76 - if not do_signoff and config.has_option('options', 'signoff'):
77 - do_signoff = config.getboolean('options', 'signoff')
78 ---
79 -2.4.0
80 -
81
82 diff --git a/dev-vcs/pwclient/files/pwclient-20141110122616-0002-pwclient-use-print_function-for-better-py3-compatibi.patch b/dev-vcs/pwclient/files/pwclient-20141110122616-0002-pwclient-use-print_function-for-better-py3-compatibi.patch
83 deleted file mode 100644
84 index 70f54a7aed3..00000000000
85 --- a/dev-vcs/pwclient/files/pwclient-20141110122616-0002-pwclient-use-print_function-for-better-py3-compatibi.patch
86 +++ /dev/null
87 @@ -1,101 +0,0 @@
88 -From 0991ccb0e7c0be66e087839f88a7120394c2f052 Mon Sep 17 00:00:00 2001
89 -From: Mike Frysinger <vapier@××××××××.org>
90 -Date: Tue, 5 May 2015 23:54:16 -0400
91 -Subject: [PATCH 2/3] pwclient: use print_function for better py3 compatibility
92 -
93 -The script already tries to use print like a function in many places but
94 -is really passing a parenthesized string. Import the print_function from
95 -the future module so that it actually works as intended.
96 -
97 -We also need to fix up a few latent print statements to make it work.
98 -
99 -Signed-off-by: Mike Frysinger <vapier@××××××××.org>
100 ----
101 - apps/patchwork/bin/pwclient | 26 ++++++++++++++------------
102 - 1 file changed, 14 insertions(+), 12 deletions(-)
103 -
104 -diff --git a/apps/patchwork/bin/pwclient b/apps/patchwork/bin/pwclient
105 -index 56aa909..2e6daa5 100755
106 ---- a/apps/patchwork/bin/pwclient
107 -+++ b/apps/patchwork/bin/pwclient
108 -@@ -19,6 +19,8 @@
109 - # along with Patchwork; if not, write to the Free Software
110 - # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
111 -
112 -+from __future__ import print_function
113 -+
114 - import os
115 - import sys
116 - import xmlrpclib
117 -@@ -170,9 +172,9 @@ def action_list(rpc, filter, submitter_str, delegate_str, format_str=None):
118 - else:
119 - for id in ids:
120 - person = rpc.person_get(id)
121 -- print "Patches submitted by %s <%s>:" % \
122 -- (unicode(person['name']).encode("utf-8"), \
123 -- unicode(person['email']).encode("utf-8"))
124 -+ print('Patches submitted by %s <%s>:' %
125 -+ (unicode(person['name']).encode('utf-8'),
126 -+ unicode(person['email']).encode('utf-8')))
127 - f = filter
128 - f.add("submitter_id", id)
129 - patches = rpc.patch_list(f.d)
130 -@@ -187,8 +189,8 @@ def action_list(rpc, filter, submitter_str, delegate_str, format_str=None):
131 - else:
132 - for id in ids:
133 - person = rpc.person_get(id)
134 -- print "Patches delegated to %s <%s>:" % \
135 -- (person['name'], person['email'])
136 -+ print('Patches delegated to %s <%s>:' %
137 -+ (person['name'], person['email']))
138 - f = filter
139 - f.add("delegate_id", id)
140 - patches = rpc.patch_list(f.d)
141 -@@ -245,7 +247,7 @@ def action_get(rpc, patch_id):
142 - try:
143 - f.write(unicode(s).encode("utf-8"))
144 - f.close()
145 -- print "Saved patch to %s" % fname
146 -+ print('Saved patch to %s' % fname)
147 - except:
148 - sys.stderr.write("Failed to write to %s\n" % fname)
149 - sys.exit(1)
150 -@@ -258,13 +260,13 @@ def action_apply(rpc, patch_id, apply_cmd=None):
151 - sys.exit(1)
152 -
153 - if apply_cmd is None:
154 -- print "Applying patch #%d to current directory" % patch_id
155 -+ print('Applying patch #%d to current directory' % patch_id)
156 - apply_cmd = ['patch', '-p1']
157 - else:
158 -- print "Applying patch #%d using %s" % (
159 -- patch_id, repr(' '.join(apply_cmd)))
160 -+ print('Applying patch #%d using %s' %
161 -+ (patch_id, repr(' '.join(apply_cmd))))
162 -
163 -- print "Description: %s" % patch['name']
164 -+ print('Description: %s' % patch['name'])
165 - s = rpc.patch_get_mbox(patch_id)
166 - if len(s) > 0:
167 - proc = subprocess.Popen(apply_cmd, stdin = subprocess.PIPE)
168 -@@ -295,7 +297,7 @@ def action_update_patch(rpc, patch_id, state = None, commit = None):
169 - success = False
170 - try:
171 - success = rpc.patch_set(patch_id, params)
172 -- except xmlrpclib.Fault, f:
173 -+ except xmlrpclib.Fault as f:
174 - sys.stderr.write("Error updating patch: %s\n" % f.faultString)
175 -
176 - if not success:
177 -@@ -668,7 +670,7 @@ def main():
178 - for patch_id in non_empty(h, patch_ids):
179 - s = rpc.patch_get_mbox(patch_id)
180 - if len(s) > 0:
181 -- print unicode(s).encode("utf-8")
182 -+ print(unicode(s).encode('utf-8'))
183 -
184 - elif action == 'info':
185 - for patch_id in non_empty(h, patch_ids):
186 ---
187 -2.4.0
188 -
189
190 diff --git a/dev-vcs/pwclient/files/pwclient-20141110122616-0003-pwclient-basic-python3-support.patch b/dev-vcs/pwclient/files/pwclient-20141110122616-0003-pwclient-basic-python3-support.patch
191 deleted file mode 100644
192 index da75ac1d3e1..00000000000
193 --- a/dev-vcs/pwclient/files/pwclient-20141110122616-0003-pwclient-basic-python3-support.patch
194 +++ /dev/null
195 @@ -1,125 +0,0 @@
196 -From fcbd40fe7fa3fbdc5ffb386c5c7b72a8704e7136 Mon Sep 17 00:00:00 2001
197 -From: Mike Frysinger <vapier@××××××××.org>
198 -Date: Wed, 6 May 2015 00:12:02 -0400
199 -Subject: [PATCH 3/3] pwclient: basic python3 support
200 -
201 -This fixes a few random issues to make the script work at least somewhat
202 -under python 3:
203 -- set the default encoding to utf-8
204 -- handle xmlrpclib/xmlrpc.client module renames
205 -- handle ConfigParser/configparser module renames
206 -- add a unicode() stub for python 3
207 -- fix old style class definition w/Filter
208 -- use list comprehension instead of map()
209 -- drop the unused version= keyword w/argparse
210 -
211 -The code still runs under python 2 the same as before, and now works for
212 -the most part under python 3 -- the handling of encoded content still needs
213 -some work, but that'll require more surgery, and is best left to another
214 -commit after this.
215 -
216 -Signed-off-by: Mike Frysinger <vapier@××××××××.org>
217 ----
218 - apps/patchwork/bin/pwclient | 31 +++++++++++++++++++++++--------
219 - 1 file changed, 23 insertions(+), 8 deletions(-)
220 -
221 -diff --git a/apps/patchwork/bin/pwclient b/apps/patchwork/bin/pwclient
222 -index 2e6daa5..5080a17 100755
223 ---- a/apps/patchwork/bin/pwclient
224 -+++ b/apps/patchwork/bin/pwclient
225 -@@ -1,4 +1,5 @@
226 - #!/usr/bin/env python
227 -+# -*- coding: utf-8 -*-
228 - #
229 - # Patchwork command line client
230 - # Copyright (C) 2008 Nate Case <ncase@×××××××.com>
231 -@@ -23,16 +24,31 @@ from __future__ import print_function
232 -
233 - import os
234 - import sys
235 --import xmlrpclib
236 -+try:
237 -+ import xmlrpclib
238 -+except ImportError:
239 -+ # Python 3 has merged/renamed things.
240 -+ import xmlrpc.client as xmlrpclib
241 - import argparse
242 - import string
243 - import tempfile
244 - import subprocess
245 - import base64
246 --import ConfigParser
247 -+try:
248 -+ import ConfigParser
249 -+except ImportError:
250 -+ # Python 3 has renamed things.
251 -+ import configparser as ConfigParser
252 - import shutil
253 - import re
254 -
255 -+# Add a shim for Python 2's unicode() helper.
256 -+try:
257 -+ unicode
258 -+except NameError:
259 -+ # Python 3 does everything by unicode now.
260 -+ unicode = str
261 -+
262 - # Default Patchwork remote XML-RPC server URL
263 - # This script will check the PW_XMLRPC_URL environment variable
264 - # for the URL to access. If that is unspecified, it will fallback to
265 -@@ -40,7 +56,7 @@ import re
266 - DEFAULT_URL = "http://patchwork/xmlrpc/"
267 - CONFIG_FILE = os.path.expanduser('~/.pwclientrc')
268 -
269 --class Filter:
270 -+class Filter(object):
271 - """Filter for selecting patches."""
272 - def __init__(self):
273 - # These fields refer to specific objects, so they are special
274 -@@ -135,7 +151,7 @@ def person_ids_by_name(rpc, name):
275 - if len(name) == 0:
276 - return []
277 - people = rpc.person_list(name, 0)
278 -- return map(lambda x: x['id'], people)
279 -+ return [x['id'] for x in people]
280 -
281 - def list_patches(patches, format_str=None):
282 - """Dump a list of patches to stdout."""
283 -@@ -352,7 +368,7 @@ class _RecursiveHelpAction(argparse._HelpAction):
284 - parser.exit()
285 -
286 - def main():
287 -- hash_parser = argparse.ArgumentParser(add_help=False, version=False)
288 -+ hash_parser = argparse.ArgumentParser(add_help=False)
289 - hash_parser.add_argument(
290 - '-h', metavar='HASH', dest='hash', action='store',
291 - help='''Lookup by patch hash'''
292 -@@ -362,7 +378,7 @@ def main():
293 - help='Patch ID',
294 - )
295 -
296 -- filter_parser = argparse.ArgumentParser(add_help=False, version=False)
297 -+ filter_parser = argparse.ArgumentParser(add_help=False)
298 - filter_parser.add_argument(
299 - '-s', metavar='STATE',
300 - help='''Filter by patch state (e.g., 'New', 'Accepted', etc.)'''
301 -@@ -397,7 +413,7 @@ def main():
302 - 'patch_name', metavar='STR', nargs='?',
303 - help='substring to search for patches by name',
304 - )
305 -- help_parser = argparse.ArgumentParser(add_help=False, version=False)
306 -+ help_parser = argparse.ArgumentParser(add_help=False)
307 - help_parser.add_argument(
308 - '--help', action='help', help=argparse.SUPPRESS,
309 - #help='''show this help message and exit'''
310 -@@ -406,7 +422,6 @@ def main():
311 - action_parser = argparse.ArgumentParser(
312 - prog='pwclient',
313 - add_help=False,
314 -- version=False,
315 - formatter_class=argparse.RawDescriptionHelpFormatter,
316 - epilog='''(apply | get | info | view | update) (-h HASH | ID [ID ...])''',
317 - )
318 ---
319 -2.4.0
320 -
321
322 diff --git a/dev-vcs/pwclient/metadata.xml b/dev-vcs/pwclient/metadata.xml
323 deleted file mode 100644
324 index 6f49eba8f49..00000000000
325 --- a/dev-vcs/pwclient/metadata.xml
326 +++ /dev/null
327 @@ -1,5 +0,0 @@
328 -<?xml version="1.0" encoding="UTF-8"?>
329 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
330 -<pkgmetadata>
331 -<!-- maintainer-needed -->
332 -</pkgmetadata>
333
334 diff --git a/dev-vcs/pwclient/pwclient-20141110122616.ebuild b/dev-vcs/pwclient/pwclient-20141110122616.ebuild
335 deleted file mode 100644
336 index 322df3248bc..00000000000
337 --- a/dev-vcs/pwclient/pwclient-20141110122616.ebuild
338 +++ /dev/null
339 @@ -1,44 +0,0 @@
340 -# Copyright 1999-2020 Gentoo Authors
341 -# Distributed under the terms of the GNU General Public License v2
342 -
343 -EAPI="5"
344 -
345 -PYTHON_COMPAT=( python3_6 )
346 -
347 -inherit eutils python-r1
348 -
349 -# The PV comes from:
350 -# git clone ${EGIT_REPO_URI}
351 -# cd patchwork
352 -# EGIT_COMMIT=$(git log -n1 --format=%H apps/patchwork/bin/pwclient)
353 -# date --date="$(git log -n1 --format=%ci ${EGIT_COMMIT})" -u +%Y%m%d%H%M%S
354 -EGIT_REPO_URI="git://ozlabs.org/home/jk/git/patchwork"
355 -EGIT_COMMIT="8904a7dcaf959da8db4a9a5d92b91a61eed05201"
356 -
357 -DESCRIPTION="command line utility for interacting with patchwork repos"
358 -HOMEPAGE="http://jk.ozlabs.org/projects/patchwork/"
359 -SRC_URI="mirror://gentoo/${P}"
360 -
361 -LICENSE="GPL-2"
362 -SLOT="0"
363 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
364 -IUSE=""
365 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
366 -
367 -RDEPEND="${PYTHON_DEPS}"
368 -DEPEND="${RDEPEND}"
369 -
370 -S=${WORKDIR}
371 -
372 -src_unpack() {
373 - cp "${DISTDIR}"/${P} ${PN} || die
374 -}
375 -
376 -src_prepare() {
377 - epatch "${FILESDIR}"/${P}-*.patch
378 -}
379 -
380 -src_install() {
381 - python_setup
382 - python_doscript ${PN}
383 -}