RepoConfig: cleanup portage1_profiles code
diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py
index 337edc4..1293c75 100644
--- a/pym/portage/package/ebuild/_config/LocationsManager.py
+++ b/pym/portage/package/ebuild/_config/LocationsManager.py
@@ -17,7 +17,8 @@
 from portage.localization import _
 from portage.util import ensure_dirs, grabfile, \
 	normalize_path, shlex_split, writemsg
-from portage.repository.config import parse_layout_conf
+from portage.repository.config import parse_layout_conf, \
+	_portage1_profiles_allow_directories
 
 
 _PORTAGE1_DIRECTORIES = frozenset([
@@ -28,9 +29,6 @@
 _profile_node = collections.namedtuple('_profile_node',
 	'location portage1_directories')
 
-_allow_directories = frozenset(
-	["portage-1-compat", "portage-1"])
-
 class LocationsManager(object):
 
 	def __init__(self, config_root=None, eprefix=None, config_profile_path=None, local_config=True, \
@@ -133,7 +131,7 @@
 			# protect against nested repositories.  Insane configuration, but the longest
 			# path will be the correct one.
 			repo_loc, layout_data = max(intersecting_repos, key=lambda x:len(x[0]))
-			allow_directories = any(x in _allow_directories
+			allow_directories = any(x in _portage1_profiles_allow_directories
 				for x in layout_data['profile-formats'])
 			compat_mode = layout_data['profile-formats'] == ('portage-1-compat',)
 
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 872c189..cb5beca 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -30,6 +30,9 @@
 _valid_profile_formats = frozenset(
 	['pms', 'portage-1'])
 
+_portage1_profiles_allow_directories = frozenset(
+	["portage-1-compat", "portage-1"])
+
 _repo_name_sub_re = re.compile(r'[^\w-]')
 
 def _gen_valid_repo(name):
@@ -160,7 +163,7 @@
 				'sign-commit', 'sign-manifest', 'thin-manifest', 'update-changelog'):
 				setattr(self, value.lower().replace("-", "_"), layout_data[value])
 
-			self.portage1_profiles = any(x.startswith("portage-1") \
+			self.portage1_profiles = any(x in _portage1_profiles_allow_directories
 				for x in layout_data['profile-formats'])
 			self.portage1_profiles_compat = layout_data['profile-formats'] == ('portage-1-compat',)