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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 89ECA158094 for ; Mon, 26 Sep 2022 17:52:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AD93EE0CB5; Mon, 26 Sep 2022 17:52:37 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 95107E0CB5 for ; Mon, 26 Sep 2022 17:52:37 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 81AFF340D48 for ; Mon, 26 Sep 2022 17:52:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C88045A2 for ; Mon, 26 Sep 2022 17:52:34 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1664214273.73514c310754def1f8cb932f00296e008b9d4437.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/data.py X-VCS-Directories: lib/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 73514c310754def1f8cb932f00296e008b9d4437 X-VCS-Branch: master Date: Mon, 26 Sep 2022 17:52:34 +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: e2ba1a80-1d68-44c6-b5d1-15be2fc755f3 X-Archives-Hash: 9910e1fc24ad96bfb133ce9402aa6d35 commit: 73514c310754def1f8cb932f00296e008b9d4437 Author: Zac Medico gentoo org> AuthorDate: Mon Sep 26 17:40:33 2022 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Sep 26 17:44:33 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=73514c31 data.py: fix PORTAGE_USERNAME default (bug 873088) Fix the PORTAGE_USERNAME default for the case where the portage.settings attribute exists and PORTAGE_USERNAME is unset. Fixes: 18e5a8170c69aecd10f162918de571d85055ae81 Bug: https://bugs.gentoo.org/873088 Signed-off-by: Zac Medico gentoo.org> lib/portage/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/data.py b/lib/portage/data.py index 1ef8d4aef..8aa66df7f 100644 --- a/lib/portage/data.py +++ b/lib/portage/data.py @@ -259,7 +259,7 @@ def _get_global(k): if env_key in os.environ: v = os.environ[env_key] elif hasattr(portage, "settings"): - v = portage.settings.get(env_key) + v = portage.settings.get(env_key, v) else: # The config class has equivalent code, but we also need to # do it here if _disable_legacy_globals() has been called.