From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C2C95138335 for ; Thu, 25 Apr 2019 09:22:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1BBD5E09E0; Thu, 25 Apr 2019 09:22:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 00AC7E09D7 for ; Thu, 25 Apr 2019 09:22:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AEBBF34264E for ; Thu, 25 Apr 2019 09:22:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A4D605D4 for ; Thu, 25 Apr 2019 09:22:12 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1556183909.13b7387c9288363eeb9dfbc397a2e3859eccbee7.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: man/ X-VCS-Repository: proj/portage-utils X-VCS-Files: man/mkman.py X-VCS-Directories: man/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 13b7387c9288363eeb9dfbc397a2e3859eccbee7 X-VCS-Branch: master Date: Thu, 25 Apr 2019 09:22:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c9c5a60c-77c6-4933-b0ca-e300cb0d75dd X-Archives-Hash: 5dd6e69aff68bed3ba406e0bdafb9599 commit: 13b7387c9288363eeb9dfbc397a2e3859eccbee7 Author: Fabian Groffen gentoo org> AuthorDate: Thu Apr 25 09:18:29 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Thu Apr 25 09:18:29 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=13b7387c man/mkman: fix authors showing up on random pages dropped multiprocessing crap as it complicates and doesn't really speed up anything (I suspected it to be faulty at first, but left it out) the real issue was COMMON_AUTHORS not being copied, therefore any temp additions were done to the common authors list Signed-off-by: Fabian Groffen gentoo.org> man/mkman.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/man/mkman.py b/man/mkman.py index f578305..8c7fc9d 100755 --- a/man/mkman.py +++ b/man/mkman.py @@ -9,7 +9,6 @@ import datetime import functools import glob import locale -import multiprocessing import os import re import subprocess @@ -71,7 +70,7 @@ def MkMan(applets, applet, output): usage = m.group(1) short_desc = m.group(2) - authors = COMMON_AUTHORS + authors = COMMON_AUTHORS[:] see_also = sorted(['.BR %s (1)' % x for x in applets if x != applet]) description = '' @@ -139,7 +138,7 @@ def MkMan(applets, applet, output): # Handle any fragments this applet has available for frag in sorted(glob.glob(os.path.join(FRAGS_DIR, '%s-*.include' % applet))): with open(frag) as f: - if "-authors." in frag: + if frag.endswith('-authors.include'): authors += [x.rstrip() for x in f.readlines()] else: extra_sections += [x.rstrip() for x in f.readlines()] @@ -159,13 +158,6 @@ def MkMan(applets, applet, output): with open(output, 'w') as f: f.write(TEMPLATE % data) - -def _MkMan(applets, applet): - """Trampoline to MkMan for multiprocessing pickle""" - output = os.path.join(MKMAN_DIR, '%s.1' % applet) - MkMan(applets, applet, output) - - def main(argv): os.environ['NOCOLOR'] = '1' @@ -174,10 +166,9 @@ def main(argv): # Support file completion like "qfile.1" or "./qdepends.1" applets = [os.path.basename(x).split('.', 1)[0] for x in argv] - p = multiprocessing.Pool() - functor = functools.partial(_MkMan, applets) - p.map(functor, applets) - + for applet in applets: + output = os.path.join(MKMAN_DIR, '%s.1' % applet) + MkMan(applets, applet, output) if __name__ == '__main__': sys.exit(main(sys.argv[1:]))