From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E37351399E6 for ; Fri, 4 Sep 2015 10:23:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2EAD11429B; Fri, 4 Sep 2015 10:23:25 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 788F714284 for ; Fri, 4 Sep 2015 10:23:24 +0000 (UTC) Received: from localhost ([188.162.65.9]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MTBLi-1Z8xmW49UU-00S2zb for ; Fri, 04 Sep 2015 12:23:23 +0200 Date: Fri, 4 Sep 2015 10:20:27 +0000 From: Consus To: gentoo-portage-dev@lists.gentoo.org Subject: [gentoo-portage-dev] [PATCH] git sync: Respect PORTAGE_QUIET Message-ID: <20150904102027.GB11432@daphne> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Provags-ID: V03:K0:xyb2XBx6D0o5ssFY6xIGyyXYdSeBq0F8UDUjYcoSZZ4RDUgCChq 4O3do4RAm5otbNUgXhJIGdZP16tKfCTMKZCdQ4vFYcXpfly/Uwu5pPPjpsQxYiqGtN3hsam lQ2WDAYFhfP6WcyxTLDu+8YvOR4HWhhQQkL1a7BKT787DC3iyN/BMXo2ESw5EYB52Xv2Ci5 2EGhgU+8Oh9AzOBnPpgcQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Tdf65hGF9Hs=:eYKHO8CfYSA8WIUkhD/Yps y65msXi15DjJqDo1OlAq/S2nxFXBEghQK6wtY8GNgHHBTnlxXQlfrlmlLRX1MzuAVhpwCeaSE w32s6CRJx53ce/MaV/c8Y6Arf8tCXAGbHEIAxY9m3OnjZRjwWCaFLwWob8d1Z6iYU3wga+4/b 5fRUiDkZntmFt31k4h8edFm4zNS5ETWj44kEdVaTZX8OSam6GmvBPTkDKFp2ipJ9YSyNVsCOu +mZ806BnJ093UkpztpxbnlHZZaLJnEuSIPxxHnGvCFCDIfIE8zKNL0sN449/E8Nqb7tD8vUeG fw+WOjLtTyMNnoYyIzGsCHseO2R1HVSAnGGM329GLhDYyXG59wbTlKfl+IrWmS0NjK/L7ExL1 j/lD0F2DfFQtO7MPpOAYKpUD+L7WMCZway5h4WxahjkILYn+jpLyKeiRRwU1KrButZaufruKs weOiQoROaIj2bUZ5I+iKdo8vvyG7AgsN0AdqVLrtY9A3iYTbugeM/aNWmAGtlBHJLX6VaV6XE jSPCFl1m/U+6IBbH575n2jxgBQvkZdt05Wk3PT78HCoQOUgikGlmhD6osLgr1Khgz7qiJjMCS +mZj9yFy39Q2ggzohLkRKdzbV7ZLe99ua/B58c2wJENkuhqBoEwYFdrGuZLPgxOqyBoH8CAoh facYmvbf66mUNTqk6ZDRr8vx4ckKD5oOZSFD/ih2wm9vyOBnSciYuTAMvZ14UcQ7u0cZIBLu1 bkNv1WQMTjIkesP57xmjAlmFMKjURGHCUNVleQ== X-Archives-Salt: aae55ce1-708b-43da-99d1-1bae0771a2c3 X-Archives-Hash: 21a20448fe69b42311846813010802bb Execute `git clone --quiet' and `git pull --quiet' when appropriate. --- pym/portage/sync/modules/git/git.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pym/portage/sync/modules/git/git.py b/pym/portage/sync/modules/git/git.py index 7a710ef..c14782c 100644 --- a/pym/portage/sync/modules/git/git.py +++ b/pym/portage/sync/modules/git/git.py @@ -1,4 +1,4 @@ -# Copyright 2005-2014 Gentoo Foundation +# Copyright 2005-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import logging @@ -43,15 +43,18 @@ class GitSync(NewBase): 'Created new directory %s' % self.repo.location) except IOError: return (1, False) + sync_uri = self.repo.sync_uri if sync_uri.startswith("file://"): sync_uri = sync_uri[6:] - depth_arg = '' - if self.repo.sync_depth is not None: - depth_arg = '--depth %d ' % self.repo.sync_depth - git_cmd = "%s clone %s%s ." % (self.bin_command, depth_arg, - portage._shell_quote(sync_uri)) + git_cmd_opts = "" + if self.settings.get("PORTAGE_QUIET") == "1": + git_cmd_opts += " --quiet" + if self.repo.sync_depth is not None: + git_cmd_opts += " --depth %d" % self.repo.sync_depth + git_cmd = "%s clone%s %s ." % (self.bin_command, git_cmd_opts, + portage._shell_quote(sync_uri)) writemsg_level(git_cmd + "\n") exitcode = portage.process.spawn_bash("cd %s ; exec %s" % ( @@ -72,7 +75,10 @@ class GitSync(NewBase): git directly. ''' - git_cmd = "%s pull" % self.bin_command + git_cmd_opts = "" + if self.settings.get("PORTAGE_QUIET") == "1": + git_cmd_opts += " --quiet" + git_cmd = "%s pull%s" % (self.bin_command, git_cmd_opts) writemsg_level(git_cmd + "\n") exitcode = portage.process.spawn_bash("cd %s ; exec %s" % ( -- 2.5.0