From 18aa5cc076a5597ba7e256f316835606bb5b6df9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 2 May 2013 18:52:23 -0700 Subject: [PATCH] Silence embedded profile warning for bug #467142. --- pym/portage/package/ebuild/config.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 227d3a8f0..f6049de24 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1011,11 +1011,21 @@ class config(object): writemsg(_("!!! INVALID ACCEPT_KEYWORDS: %s\n") % str(group), noiselevel=-1) - profile_broken = not self.profile_path or \ - not exists_raise_eaccess(os.path.join(self.profile_path, "parent")) and \ - exists_raise_eaccess(os.path.join(self["PORTDIR"], "profiles")) + profile_broken = False - if profile_broken: + if not self.profile_path: + profile_broken = True + else: + # If any one of these files exists, then + # the profile is considered valid. + for x in ("make.defaults", "parent", + "packages", "use.force", "use.mask"): + if exists_raise_eaccess(os.path.join(self.profile_path, x)): + break + else: + profile_broken = True + + if profile_broken and not portage._sync_disabled_warnings: abs_profile_path = None for x in (PROFILE_PATH, 'etc/make.profile'): x = os.path.join(self["PORTAGE_CONFIGROOT"], x) -- 2.26.2