summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/package/ebuild/_config/MaskManager.py5
-rw-r--r--pym/portage/repository/config.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/package/ebuild/_config/MaskManager.py b/pym/portage/package/ebuild/_config/MaskManager.py
index db94ee501..70ded2dae 100644
--- a/pym/portage/package/ebuild/_config/MaskManager.py
+++ b/pym/portage/package/ebuild/_config/MaskManager.py
@@ -31,7 +31,10 @@ class MaskManager(object):
recursive=1, remember_source_file=True, verify_eapi=True)
masters = repo.masters
if masters is None:
- masters = [repositories.mainRepo()]
+ masters = []
+ main_repo = repositories.mainRepo()
+ if main_repo is not None:
+ masters.append(main_repo)
for master in masters:
master_lines = grabfile_package(os.path.join(master.location, "profiles", "package.mask"), \
recursive=1, remember_source_file=True, verify_eapi=True)
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index e79cddb70..73cddff42 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -245,7 +245,10 @@ class RepoConfigLoader(object):
def mainRepo(self):
"""Returns the main repo"""
- return self.prepos[self.prepos['DEFAULT'].main_repo]
+ maid_repo = self.prepos['DEFAULT'].main_repo
+ if maid_repo is None:
+ return None
+ return self.prepos[maid_repo]
def _check_locations(self):
"""Check if repositories location are correct and show a warning message if not"""