proj/portage:master commit in: lib/_emerge/
"Matt Turner" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786214415.b910b72b70ff91466cd123a3d28812d64d8eb036.mattst88@gentoo> |
commit: b910b72b70ff91466cd123a3d28812d64d8eb036
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 8 18:14:46 2026 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Aug 8 18:40:15 2026 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b910b72b
_observability: guard against uninitialized portage.settings
emerge --status is handled before portage.settings is set up;
missing_feature_hint() crashed with AttributeError when it tried to read
portage.settings.features. Fall back to an empty frozenset so the hint
fires correctly instead.
Fixes: 7a89160a0 ("emerge: tell the user when --status has nothing to report")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
lib/_emerge/_observability.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/_emerge/_observability.py b/lib/_emerge/_observability.py
index ff75405a0..9226ff752 100644
--- a/lib/_emerge/_observability.py
+++ b/lib/_emerge/_observability.py
@@ -226,7 +226,8 @@ def missing_feature_hint(snapshots, features=None):
if snapshots:
return None
if features is None:
- features = portage.settings.features
+ settings = getattr(portage, "settings", None)
+ features = settings.features if settings is not None else frozenset()
if "observability" in features:
return None
return NOT_ENABLED_HINT