Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/
Date: Mon, 26 Sep 2022 17:52:38
Message-Id: 1664214273.73514c310754def1f8cb932f00296e008b9d4437.zmedico@gentoo
1 commit: 73514c310754def1f8cb932f00296e008b9d4437
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 26 17:40:33 2022 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 26 17:44:33 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=73514c31
7
8 data.py: fix PORTAGE_USERNAME default (bug 873088)
9
10 Fix the PORTAGE_USERNAME default for the case where the portage.settings
11 attribute exists and PORTAGE_USERNAME is unset.
12
13 Fixes: 18e5a8170c69aecd10f162918de571d85055ae81
14 Bug: https://bugs.gentoo.org/873088
15 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
16
17 lib/portage/data.py | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/lib/portage/data.py b/lib/portage/data.py
21 index 1ef8d4aef..8aa66df7f 100644
22 --- a/lib/portage/data.py
23 +++ b/lib/portage/data.py
24 @@ -259,7 +259,7 @@ def _get_global(k):
25 if env_key in os.environ:
26 v = os.environ[env_key]
27 elif hasattr(portage, "settings"):
28 - v = portage.settings.get(env_key)
29 + v = portage.settings.get(env_key, v)
30 else:
31 # The config class has equivalent code, but we also need to
32 # do it here if _disable_legacy_globals() has been called.