From: Zac Medico Date: Fri, 3 May 2013 01:52:23 +0000 (-0700) Subject: Silence embedded profile warning for bug #467142. X-Git-Tag: v2.2.0_alpha174~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=18aa5cc076a5597ba7e256f316835606bb5b6df9;p=portage.git Silence embedded profile warning for bug #467142. --- 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)