From 923f912d7c5ade8b5b18f23f1cd12add08f73c21 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Sep 2013 13:44:34 -0700 Subject: [PATCH] emerge-webrsync: handle missing dir, bug #484950 --- pym/portage/repository/config.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index bb63b1a55..b14eeb7fe 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -443,7 +443,10 @@ class RepoConfigLoader(object): #overlay priority is negative because we want them to be looked before any other repo base_priority = 0 for ov in overlays: - if isdir_raise_eaccess(ov): + # Ignore missing directory for 'gentoo' so that + # first sync with emerge-webrsync is possible. + if isdir_raise_eaccess(ov) or \ + (base_priority == 0 and ov is portdir): repo_opts = default_repo_opts.copy() repo_opts['location'] = ov repo = RepoConfig(None, repo_opts, local_config=local_config) @@ -643,6 +646,10 @@ class RepoConfigLoader(object): writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf has location attribute set " "to nonexistent directory: '%s'") % (repo_name, repo.location), level=logging.ERROR, noiselevel=-1) + + # Ignore missing directory for 'gentoo' so that + # first sync with emerge-webrsync is possible. + if repo.name != 'gentoo': del prepos[repo_name] continue -- 2.26.2