From: Zac Medico Date: Tue, 18 Jun 2013 16:13:43 +0000 (-0700) Subject: RepoConfigLoader: delete repo if location missing X-Git-Tag: v2.2.0_alpha181~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=86d69ef86ab2a9addec6a290a1c3958bc2ba55de;p=portage.git RepoConfigLoader: delete repo if location missing --- diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index da8c36561..a63bc9ca1 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -508,8 +508,16 @@ class RepoConfigLoader(object): # Do this before expanding aliases, so that location_map and # treemap consistently map unaliased names whenever available. - for repo_name, repo in prepos.items(): - if repo.location is not None: + for repo_name, repo in list(prepos.items()): + if repo.location is None: + if repo_name != 'DEFAULT': + if paths: + writemsg_level(_("Location undefined for " \ + "repository '%s' referenced in '%s'\n") % \ + (repo.name, paths[0]), + level=logging.ERROR, noiselevel=-1) + del prepos[repo_name] + else: location_map[repo.location] = repo_name treemap[repo_name] = repo.location