options.pretend = True
# Ensure that current repository is in the list of enabled repositories.
+repodir = os.path.realpath(portdir_overlay)
try:
- repoman_settings.repositories.get_repo_for_location(portdir_overlay)
+ repoman_settings.repositories.get_repo_for_location(repodir)
except KeyError:
repo_name = portage.repository.config.RepoConfig._read_valid_repo_name(portdir_overlay)[0]
layout_conf_data = portage.repository.config.parse_layout_conf(portdir_overlay)[0]
# Constrain dependency resolution to the master(s)
# that are specified in layout.conf.
-repodir = os.path.realpath(portdir_overlay)
repo_config = repoman_settings.repositories.get_repo_for_location(repodir)
portdb.porttrees = list(repo_config.eclass_db.porttrees)
portdir = portdb.porttrees[0]
commit_env = os.environ.copy()
# list() is for iteration on a copy.
for repo in list(repoman_settings.repositories):
- found = False
- for location in [portdir_overlay] + [x.location for x in repo_config.masters]:
- try:
- if os.path.samefile(location, repo.location):
- found = True
- break
- except OSError:
- pass
- if not found:
+ # all paths are canonical
+ if repo.location not in [repodir] + [x.location for x in repo_config.masters]:
del repoman_settings.repositories[repo.name]
if repo_config.allow_provide_virtual: