From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S5tQt-0006Ww-PC for garchives@archives.gentoo.org; Fri, 09 Mar 2012 06:36:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 07FA8E08DC; Fri, 9 Mar 2012 06:35:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C705CE08DC for ; Fri, 9 Mar 2012 06:35:59 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D36231B4032 for ; Fri, 9 Mar 2012 06:35:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CB9A3E5428 for ; Fri, 9 Mar 2012 06:35:55 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1331274943.c0177a6e01e0919164f373c3cc130a265e8cf27c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c0177a6e01e0919164f373c3cc130a265e8cf27c X-VCS-Branch: master Date: Fri, 9 Mar 2012 06:35:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: b6a17881-1239-4140-ae12-6a8a06b0c203 X-Archives-Hash: 271c3eb7d404af676982266e9adf8eca commit: c0177a6e01e0919164f373c3cc130a265e8cf27c Author: Zac Medico gentoo org> AuthorDate: Fri Mar 9 06:35:43 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Mar 9 06:35:43 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dc0177a6e install-info: avoid unnecessary shell --- pym/_emerge/main.py | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 45ca6f5..c1adced 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -1,4 +1,4 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 from __future__ import print_function @@ -6,6 +6,7 @@ from __future__ import print_function import logging import signal import stat +import subprocess import sys import textwrap import platform @@ -179,11 +180,21 @@ def chk_updated_info_files(root, infodirs, prev_mti= mes, retval): raise del e processed_count +=3D 1 - myso =3D portage.subprocess_getstatusoutput( - "LANG=3DC LANGUAGE=3DC /usr/bin/install-info " + - "--dir-file=3D%s/dir %s/%s" % (inforoot, inforoot, x))[1] + try: + proc =3D subprocess.Popen( + ['/usr/bin/install-info', + '--dir-file=3D%s' % os.path.join(inforoot, "dir"), + os.path.join(inforoot, x)], + env=3Ddict(os.environ, LANG=3D"C", LANGUAGE=3D"C"), + stdout=3Dsubprocess.PIPE, stderr=3Dsubprocess.STDOUT) + except OSError: + myso =3D None + else: + myso =3D _unicode_decode( + proc.communicate()[0]).rstrip("\n") + proc.wait() existsstr=3D"already exists, for file `" - if myso!=3D"": + if myso: if re.search(existsstr,myso): # Already exists... Don't increment the count for this. pass