Silence embedded profile warning for bug #467142.
authorZac Medico <zmedico@gentoo.org>
Fri, 3 May 2013 01:52:23 +0000 (18:52 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 3 May 2013 01:52:23 +0000 (18:52 -0700)
pym/portage/package/ebuild/config.py

index 227d3a8f02564d59453dc55960f4c45207827ea7..f6049de24331f571b91ccf95f8f342d7689b50ca 100644 (file)
@@ -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)