From 395bd7ee3d51b62a2f5fb65ead53785aa106b7c8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 21 Dec 2010 09:35:25 -0800 Subject: [PATCH] Display relevant FEATURES before setup phase Thanks to Christian Ruppert for the suggestion. --- pym/_emerge/EbuildPhase.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/EbuildPhase.py b/pym/_emerge/EbuildPhase.py index 2135c62b2..6197d81d6 100644 --- a/pym/_emerge/EbuildPhase.py +++ b/pym/_emerge/EbuildPhase.py @@ -29,6 +29,13 @@ class EbuildPhase(CompositeTask): __slots__ = ("actionmap", "phase", "settings") + # FEATURES displayed prior to setup phase + _features_display = ("ccache", "distcc", "fakeroot", + "installsources", "keeptemp", "keepwork", "nostrip", + "preserve-libs", "sandbox", "selinux", "sesandbox", + "splitdebug", "suidctl", "test", "userpriv", + "usersandbox") + def _start(self): need_builddir = self.phase not in EbuildProcess._phases_without_builddir @@ -70,7 +77,14 @@ class EbuildPhase(CompositeTask): msg.append("Repository: %s" % self.settings['PORTAGE_REPO_NAME']) if maint_str: msg.append("Maintainer: %s" % maint_str) - msg.append("USE: %s" % use) + msg.append("USE: %s" % use) + relevant_features = [] + enabled_features = self.settings.features + for x in self._features_display: + if x in enabled_features: + relevant_features.append(x) + if relevant_features: + msg.append("FEATURES: %s" % " ".join(relevant_features)) self._elog('einfo', msg) if self.phase == 'package': -- 2.26.2