From a35f183bc219c02057f90823f3ffea9672253b84 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 18 Jun 2013 18:58:15 -0700 Subject: [PATCH] RepoConfigLoader: suppress /usr/portage warning Suppress warnings for the make.defaults PORTDIR setting if we have an existing main-repo defined in repos.conf. --- pym/portage/repository/config.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 40fe2c9c8..6206affb4 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -426,6 +426,17 @@ class RepoConfigLoader(object): prepos[repo.name] = repo else: + if base_priority == 0 and ov == '/usr/portage': + # Suppress warnings for the make.defaults + # PORTDIR setting if we have an existing + # main-repo defined in repos.conf. + main_repo = prepos['DEFAULT'].main_repo + if main_repo is not None and main_repo in prepos: + main_repo_loc = prepos[main_repo].location + if main_repo_loc and \ + isdir_raise_eaccess(main_repo_loc): + continue + if not portage._sync_disabled_warnings: writemsg(_("!!! Invalid PORTDIR_OVERLAY (not a dir): '%s'\n") % ov, noiselevel=-1) -- 2.26.2