emerge-webrsync: handle missing dir, bug #484950
authorZac Medico <zmedico@gentoo.org>
Mon, 23 Sep 2013 20:44:34 +0000 (13:44 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Sep 2013 20:44:34 +0000 (13:44 -0700)
pym/portage/repository/config.py

index bb63b1a55aabefe8501e83f8d09a552b6d1bb9ac..b14eeb7fee1aa42bd084af2eef7b738e90d15649 100644 (file)
@@ -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