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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1F3B615800A for ; Thu, 17 Aug 2023 06:53:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52A6C2BC016; Thu, 17 Aug 2023 06:53:05 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 36AB52BC016 for ; Thu, 17 Aug 2023 06:53:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 49A3B34095A for ; Thu, 17 Aug 2023 06:53:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D3B50E93 for ; Thu, 17 Aug 2023 06:53:02 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1692255175.ab71ec960b65b2d77e5669d8979dc72e3f4ffb41.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: /, lib/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: NEWS lib/_emerge/main.py X-VCS-Directories: lib/_emerge/ / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: ab71ec960b65b2d77e5669d8979dc72e3f4ffb41 X-VCS-Branch: master Date: Thu, 17 Aug 2023 06:53:02 +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: b5bae825-95d1-4220-99f3-595551879a83 X-Archives-Hash: e98ca0d8290429545f9f50c4cbbab93f commit: ab71ec960b65b2d77e5669d8979dc72e3f4ffb41 Author: Sam James gentoo org> AuthorDate: Thu Aug 17 06:46:53 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Aug 17 06:52:55 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab71ec96 lib: _emerge: call portage.util.initialize_logger() We don't have a root logger setup otherwise which means we can't get nice output from things like gemato which define their own logger names/domains. And respect --debug for it. Signed-off-by: Sam James gentoo.org> NEWS | 9 +++++++++ lib/_emerge/main.py | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/NEWS b/NEWS index d442a42ab0..ad541b95b1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +portage-3.0.51 (UNRELEASED) +-------------- + +Features: +* emerge: Set up logging immediately and respect --debug for log level. + +* sync: git, rsync: now respects --debug for better output from gemato. This is + especially useful for debugging hangs during the 'Refreshing keys' stage. + portage-3.0.50 (2023-08-09) -------------- diff --git a/lib/_emerge/main.py b/lib/_emerge/main.py index 41bed09696..d92f069901 100644 --- a/lib/_emerge/main.py +++ b/lib/_emerge/main.py @@ -1191,6 +1191,10 @@ def emerge_main(args: Optional[list[str]] = None): myaction, myopts, myfiles = parse_opts(args, silent=True) if "--debug" in myopts: os.environ["PORTAGE_DEBUG"] = "1" + portage.util.initialize_logger(logging.DEBUG) + else: + portage.util.initialize_logger() + if "--config-root" in myopts: os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"] if "--sysroot" in myopts: